Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCM-7593 | test: automate id:OCP-36128 Updated a new checkpoint #1959

Merged
merged 1 commit into from
Apr 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion tests/e2e/test_rosacli_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,20 @@ var _ = Describe("Edit User",
clusterAdminsUserName = "testcu"
)

By("Try to list the user when there is no one")
_, output, err := userService.ListUsers(clusterID)
Expect(err).ToNot(HaveOccurred())
textData := rosaClient.Parser.TextData.Input(output).Parse().Tip()
Expect(textData).To(ContainSubstring("INFO: There are no users configured for cluster '%s'", clusterID))

By("Grant dedicated-admins user")
out, err := userService.GrantUser(
clusterID,
dedicatedAdminsGroupName,
dedicatedAdminsUserName,
)
Expect(err).ToNot(HaveOccurred())
textData := rosaClient.Parser.TextData.Input(out).Parse().Tip()
textData = rosaClient.Parser.TextData.Input(out).Parse().Tip()
Expect(textData).Should(ContainSubstring("Granted role '%s' to user '%s' on cluster '%s'", dedicatedAdminsGroupName, dedicatedAdminsUserName, clusterID))

By("Grant cluster-admins user")
Expand Down