Skip to content

Commit

Permalink
OCM-10512 | fix: Fixing OCM-10512 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
OAharoni-RedHat committed Sep 5, 2024
1 parent c9904e5 commit ef06366
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions tests/e2e/test_rosacli_machine_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -660,12 +660,20 @@ var _ = Describe("Create machinepool",
Expect(err).ToNot(HaveOccurred())

By("Create temporary account-roles for instance type list")
accountRoles, err := ph.PrepareAccountRoles(rosaClient, "test-55979",
false,
clusterConfig.Version.RawID,
clusterConfig.Version.ChannelGroup,
"", "")
namePrefix := common.GenerateRandomName("test-55979", 2)
majorVersion := common.SplitMajorVersion(clusterConfig.Version.RawID)
_, err = rosaClient.OCMResource.CreateAccountRole("--mode", "auto",
"--prefix", namePrefix,
"--version", majorVersion,
"--channel-group", clusterConfig.Version.ChannelGroup,
"-y")
Expect(err).ToNot(HaveOccurred())

var accountRoles *rosacli.AccountRolesUnit
accRoleList, _, err := rosaClient.OCMResource.ListAccountRole()
Expect(err).ToNot(HaveOccurred())
accountRoles = accRoleList.DigAccountRoles(namePrefix, false)

defer rosaClient.OCMResource.DeleteAccountRole(
"--prefix", "test-55979",
"--mode", "auto",
Expand Down

0 comments on commit ef06366

Please sign in to comment.