-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xds/federation: e2e tests #5103
Conversation
move func build resource name to testutils [xds_fed_e2e_tests] 111 [xds_fed_e2e_tests] magic!
"google.golang.org/grpc/xds/internal/xdsclient/xdsresource/version" | ||
) | ||
|
||
func BuildResourceName(typ xdsresource.ResourceType, auth, id string, ctxParams map[string]string) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a comment to make vet happy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
defer func() func() { | ||
old := envconfig.XDSFederation | ||
envconfig.XDSFederation = true | ||
return func() { envconfig.XDSFederation = old } | ||
}()() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This double func
is super hard to read. Why do we need to do it this way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deleted
if err != nil { | ||
t.Fatalf("Failed to create xDS resolver for testing: %v", err) | ||
} | ||
port, cleanup2 := clientSetup(t, &testService{}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: there is no var cleanup
for this to be cleanup2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Also moved func
BuildResourceName
to testutils to be sharedRELEASE NOTES: N/A