-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
interop: Custom creds for stress test client #6809
Conversation
Allows custom, Google specific credentials to be specified from the command line. Also adds a final printout to stdout with the total amount of calls made. Stress tests can use that to determine the average QPS of a run.
@dfawley Could you please help get this merged? |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #6809 +/- ##
==========================================
+ Coverage 83.40% 83.48% +0.08%
==========================================
Files 285 285
Lines 30879 30879
==========================================
+ Hits 25754 25780 +26
+ Misses 4053 4028 -25
+ Partials 1072 1071 -1 |
Please make sure |
if *customCredentialsType != "" { | ||
if *customCredentialsType == googleDefaultCredsName { | ||
opts = append(opts, grpc.WithCredentialsBundle(google.NewDefaultCredentials())) | ||
} else if *customCredentialsType == computeEngineCredsName { | ||
opts = append(opts, grpc.WithCredentialsBundle(google.NewComputeEngineCredentials())) | ||
} else { | ||
logger.Fatalf("Unknown custom credentials: %v", *customCredentialsType) | ||
} |
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.
Consider:
switch *customCredentialsType {
case googleDefaultCredsName:
case computeEngineCredsName:
case "":
if useTLS {
}
default:
// unknown custom creds error
}
Also if we can change the spec here, consider custom_creds_type=="tls"
means to use tls instead of having a separate flag for it. Having two flags for one setting is problematic.
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.
That's how the flags work in the interop test client across languages as well as the java stress test one. Makes sense to revisit, but I think that would be a broad change outside the scope of this PR.
Allows custom, Google specific credentials to be specified from the command line.
Also adds a final printout to stdout with the total amount of calls made. Stress tests can use that to determine the average QPS of a run.
RELEASE NOTES: none