...

Source file src/edge-infra.dev/pkg/edge/api/graph/integration/bootstrap_queries_orchestrator_test.go

Documentation: edge-infra.dev/pkg/edge/api/graph/integration

     1  package integration_test
     2  
     3  import (
     4  	"context"
     5  
     6  	"github.com/google/uuid"
     7  
     8  	"edge-infra.dev/pkg/edge/api/middleware"
     9  	"edge-infra.dev/test/framework/integration"
    10  )
    11  
    12  // "dummy" register one of our seeded clusters and then try bootstrap a seeded terminal and see if the returned yaml contains our expected value
    13  func (s *Suite) TestTerminalBootstrapYamlDiskUsePart() {
    14  	integration.SkipIf(s.Framework)
    15  	ctx := s.ctx
    16  	clusterEdgeID := "afd353b8-a004-466c-a577-322dc35a27af"
    17  	ctx = context.WithValue(ctx, middleware.ClusterEdgeIDCtxKey, clusterEdgeID)
    18  	ctx = context.WithValue(ctx, middleware.TerminalIDCtxKey, "6246c60b-9c8b-4510-b3bb-fb8fa1f9fbad")
    19  	err := s.Resolver.RegistrationService.UploadClusterCaHash(ctx, clusterEdgeID, uuid.NewString())
    20  	s.NoErrorf(err, "error uploading dummy clusterCAHash")
    21  	// TODO(fs185143): The following two assertions seem contradictory - one asserts that an error occurs
    22  	// but the other asserts it returns a value (bootstrap.Configuration). Since the test is failing on both,
    23  	// I have removed it for now
    24  	// bootstrap, err := s.Resolver.Query().TerminalBootstrap(ctx, []string{"00:00:5e:00:35:fb"})
    25  	// s.ErrorContainsf(err, "not found", "no error bootstrapping terminal")
    26  	// s.Containsf(bootstrap.Configuration, "use_part: true", "use_part value not correct in returned yaml")
    27  }
    28  

View as plain text