Deprecate AddMFADevice and its top-level messages#32516
Conversation
|
Branched from #32428. I'm tempted to do one more test follow up, this time consolidating scenarios and simplifying some of the (multiple) helpers we have. Let's see about that tomorrow. :) |
|
|
||
| type authClient interface { | ||
| AddMFADevice(ctx context.Context) (proto.AuthService_AddMFADeviceClient, error) | ||
| type authClientI interface { |
There was a problem hiding this comment.
To avoid name clashes with variables named authClient.
|
|
||
| // Create user and set password. | ||
| const username = "TestAddMFADevice" | ||
| const password = "supersecretpassword!!1!" |
There was a problem hiding this comment.
It has letters, it has numbers, it has special characters. Top notch.
| { | ||
| name: "with webauthn", | ||
| getAuthPreference: func() types.AuthPreference { | ||
| getAuthPreference: func(t *testing.T) types.AuthPreference { |
There was a problem hiding this comment.
taking notes. are we passing in the t, so that when it fails we can get specific details?
There was a problem hiding this comment.
The t in the top test function is not the same instance as the t in the t.Run function, so when these fail we get an error message from Go itself (because we are mixing the ts).
This is a common-ish test gotcha, with the other being using t.Fatal (and similar) in goroutines.
I hope this explanation makes sense.
|
Thanks for the quick review! |
Deprecate AddMFADevice and move the majority of tests (apart from exactly one) to rely on AddMFADeviceSync instead.
#20343