Skip to content

Commit

Permalink
Correct parameters in createSecurityToken
Browse files Browse the repository at this point in the history
Signed-off-by: Prasad Ghangal <[email protected]>
  • Loading branch information
PrasadG193 committed Dec 19, 2024
1 parent acbbe3f commit 0b86afb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/iterator/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ func (th *testHarness) getSnapshotMetadataServiceCR(ctx context.Context, csiDriv
return th.RetGetSnapshotMetadataServiceCRService, th.RetGetSnapshotMetadataServiceCRErr
}

func (th *testHarness) createSecurityToken(ctx context.Context, saName, saNamespace, audience string) (string, error) {
func (th *testHarness) createSecurityToken(ctx context.Context, saNamespace, saName, audience string) (string, error) {
th.InCreateSecurityTokenSAName = saName
th.InCreateSecurityTokenSANamespace = saNamespace
th.InCreateSecurityTokenAudience = audience
Expand Down
4 changes: 2 additions & 2 deletions pkg/iterator/iter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ func TestCreateSecurityToken(t *testing.T) {
th := newTestHarness()
iter := th.NewTestIterator()

securityToken, err := iter.createSecurityToken(context.Background(), th.SAName, th.SANamespace, th.Audience)
securityToken, err := iter.createSecurityToken(context.Background(), th.SANamespace, th.SAName, th.Audience)
assert.Error(t, err)
assert.ErrorContains(t, err, "ServiceAccounts.CreateToken")
assert.Empty(t, securityToken)
Expand All @@ -503,7 +503,7 @@ func TestCreateSecurityToken(t *testing.T) {
return true, th.FakeTokenRequest(), nil
})

securityToken, err := iter.createSecurityToken(context.Background(), th.SAName, th.SANamespace, th.Audience)
securityToken, err := iter.createSecurityToken(context.Background(), th.SANamespace, th.SAName, th.Audience)
assert.NoError(t, err)
assert.Equal(t, th.SecurityToken, securityToken)
})
Expand Down

0 comments on commit 0b86afb

Please sign in to comment.