Skip to content

Commit

Permalink
OCM-9904 | test: automated cases id:72174
Browse files Browse the repository at this point in the history
  • Loading branch information
jfrazierRH committed Jul 25, 2024
1 parent edfd753 commit ecd93cd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions tests/e2e/test_rosacli_machine_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,18 @@ var _ = Describe("Create machinepool",
}
Expect(availableMachineTypesIDs).To(ContainElements(typesList))

By("Try to list instance-types with invalid region")
availableMachineTypes, output, err := ocmResourceService.ListInstanceTypes(
"--region", "xxx", "--role-arn", classicInstallerRoleArn)
Expect(err).To(HaveOccurred())
Expect(output.String()).Should(ContainSubstring("ERR: Unsupported region 'xxx', available regions"))

By("Delete the account-roles")
rosaClient.Runner.UnsetArgs()
_, err = ocmResourceService.DeleteAccountRole("--mode", "auto",
"--prefix", accountRolePrefix,
"-y")
Expect(err).To(BeNil())
})

It("can create spot machinepool - [id:43251]",
Expand Down
3 changes: 2 additions & 1 deletion tests/utils/exec/rosacli/ocm_resource_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ func (ors *ocmResourceService) ReflectInstanceTypesList(result bytes.Buffer) (ur
func (ors *ocmResourceService) ListInstanceTypes(flags ...string) (InstanceTypesList, bytes.Buffer, error) {
ors.client.Runner.cmdArgs = []string{}
listInstanceTypes := ors.client.Runner.
Cmd("list", "instance-types").CmdFlags(flags...)
Cmd("list", "instance-types").
CmdFlags(flags...)
output, err := listInstanceTypes.Run()
if err != nil {
return InstanceTypesList{}, output, err
Expand Down

0 comments on commit ecd93cd

Please sign in to comment.