Skip to content

Commit 1eeab2b

Browse files
committed
fix: tests
1 parent 4a5114c commit 1eeab2b

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

app/serviceaccount_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ func (s *ServiceAccountTestSuite) SetupTest() {
4444
Commands: []*cli.Command{out.Command},
4545
Flags: []cli.Flag{
4646
AutoConfirmFlag,
47+
IdempotentFlag,
4748
},
4849
}
4950
}
@@ -392,5 +393,5 @@ func (s *ServiceAccountTestSuite) TestSetNamespacePermissionsNoChange() {
392393
},
393394
},
394395
})).Return(nil, status.Error(codes.InvalidArgument, "nothing to change")).Times(1)
395-
s.NoError(s.RunCmd("service-account", "set-namespace-permissions", "--service-account-id", "test-service-account-id", "-p", "test-namespace-1=Read"))
396+
s.NoError(s.RunCmd("--idempotent", "service-account", "set-namespace-permissions", "--service-account-id", "test-service-account-id", "-p", "test-namespace-1=Read"))
396397
}

app/user_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ func (s *UserTestSuite) SetupTest() {
4444
}
4545
flags := []cli.Flag{
4646
AutoConfirmFlag,
47+
IdempotentFlag,
4748
}
4849
s.cliApp, _ = NewTestApp(s.T(), cmds, flags)
4950
}
@@ -597,5 +598,5 @@ func (s *UserTestSuite) TestSetNamespacePermissionsNoChanges() {
597598
},
598599
},
599600
})).Return(nil, status.Error(codes.InvalidArgument, "nothing to change")).Times(1)
600-
s.NoError(s.RunCmd("user", "set-namespace-permissions", "--user-email", "test@example.com", "-p", "ns1=Admin", "-p", "ns2=Write", "-p", "ns3=Read"))
601+
s.NoError(s.RunCmd("--idempotent", "user", "set-namespace-permissions", "--user-email", "test@example.com", "-p", "ns1=Admin", "-p", "ns2=Write", "-p", "ns3=Read"))
601602
}

0 commit comments

Comments
 (0)