Skip to content

Commit

Permalink
Leverage the fact that mdsClient fields are interfaces
Browse files Browse the repository at this point in the history
  - Initialize the client apis with pointers instead of values
  • Loading branch information
arvindth committed Sep 20, 2019
1 parent 7a23e3c commit 7fba00b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/cmd/auth/auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ func newAuthCommand(prompt pcmd.Prompt, auth *sdkMock.Auth, user *sdkMock.User,
if cliName == "confluent" {
mdsConfig := mds.NewConfiguration()
mdsClient = mds.NewAPIClient(mdsConfig)
mdsClient.TokensAuthenticationApi = mdsMock.TokensAuthenticationApi{
mdsClient.TokensAuthenticationApi = &mdsMock.TokensAuthenticationApi{
GetTokenFunc: func(ctx context.Context, xSPECIALRYANHEADER string) (mds.AuthenticationResponse, *http.Response, error) {
return mds.AuthenticationResponse{
AuthToken: "y0ur.jwt.T0kEn",
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/iam/command_acl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ var mdsAclEntries = []struct {
type AclTestSuite struct {
suite.Suite
conf *config.Config
kafkaApi *mock.KafkaACLManagementApi
kafkaApi mds.KafkaACLManagementApi
preRunner pcmd.PreRunner
}

Expand Down

0 comments on commit 7fba00b

Please sign in to comment.