Skip to content

Commit

Permalink
Trace VPC creation request
Browse files Browse the repository at this point in the history
  • Loading branch information
josvazg committed Nov 12, 2024
1 parent e5bc982 commit f100499
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions test/contract/networkpeering/google.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,18 @@ func createGoogleTestVPC(ctx context.Context, vpcName string) error {
return fmt.Errorf("failed to get Google Cloud connection: %w", err)
}

request := &computepb.Network{
Name: pointer.MakePtr(vpcName),
Description: pointer.MakePtr("Atlas Kubernetes Operator E2E Tests VPC"),
AutoCreateSubnetworks: pointer.MakePtr(false),
}

op, err := gce.networkClient.Insert(ctx, &computepb.InsertNetworkRequest{
Project: gce.projectID,
NetworkResource: &computepb.Network{
Name: pointer.MakePtr(vpcName),
Description: pointer.MakePtr("Atlas Kubernetes Operator E2E Tests VPC"),
AutoCreateSubnetworks: pointer.MakePtr(false),
},
NetworkResource: request,
})
if err != nil {
return fmt.Errorf("failed to request creation of Google VPC: %w", err)
return fmt.Errorf("failed to request creation of Google VPC: %w\n%#+v", err, request)
}

err = op.Wait(ctx)
Expand Down

0 comments on commit f100499

Please sign in to comment.