diff --git a/pkg/cmd/generate/permissions.go b/pkg/cmd/generate/permissions.go index 8563d5f..1cad906 100644 --- a/pkg/cmd/generate/permissions.go +++ b/pkg/cmd/generate/permissions.go @@ -171,7 +171,7 @@ func ensureServiceAccount(saNamespace string) newSubjectFunc { // ensureUserIdentityAndGroups ensures that all - User, Identity, IdentityMapping, and Group manifests - exist func ensureUserIdentityAndGroups(IDs []string, groups []string) newSubjectFunc { - return func(ctx *clusterContext, cache objectsCache, subjectBaseName, targetNamespace string, labels map[string]string) (rbacv1.Subject, error) { + return func(ctx *clusterContext, cache objectsCache, subjectBaseName, _ string, labels map[string]string) (rbacv1.Subject, error) { // create user user := &userv1.User{ ObjectMeta: metav1.ObjectMeta{ diff --git a/pkg/cmd/generate/permissions_test.go b/pkg/cmd/generate/permissions_test.go index eb6a4c4..917901f 100644 --- a/pkg/cmd/generate/permissions_test.go +++ b/pkg/cmd/generate/permissions_test.go @@ -135,7 +135,7 @@ func TestEnsureUserAndIdentity(t *testing.T) { cache := objectsCache{} // when - subject, err := ensureUserIdentityAndGroups([]string{"12345", "abc:19944:FZZ"}, []string{"crtadmins", "cooladmins"})(ctx, cache, "john-crtadmin", commontest.HostOperatorNs, labels) + subject, err := ensureUserIdentityAndGroups([]string{"12345", "abc:19944:FZZ"}, []string{"crtadmins", "cooladmins"})(ctx, cache, "john-crtadmin", "not-used", labels) // then require.NoError(t, err) @@ -156,7 +156,7 @@ func TestEnsureUserAndIdentity(t *testing.T) { cache := objectsCache{} // when - subject, err := ensureUserIdentityAndGroups([]string{"12345", "abc:19944:FZZ"}, []string{})(ctx, cache, "john-crtadmin", commontest.HostOperatorNs, labels) + subject, err := ensureUserIdentityAndGroups([]string{"12345", "abc:19944:FZZ"}, []string{})(ctx, cache, "john-crtadmin", "not-used", labels) // then require.NoError(t, err) @@ -175,7 +175,7 @@ func TestEnsureUserAndIdentity(t *testing.T) { cache := objectsCache{} // when - _, err := ensureUserIdentityAndGroups([]string{"12345"}, []string{})(ctx, cache, "john-crtadmin", commontest.HostOperatorNs, labels) + _, err := ensureUserIdentityAndGroups([]string{"12345"}, []string{})(ctx, cache, "john-crtadmin", "not-used", labels) // then require.NoError(t, err)