Skip to content

Commit

Permalink
Merge pull request #2100 from radtriste/ocm-8290-fix-automation
Browse files Browse the repository at this point in the history
OCM-8290 | ci: Fix 61139,73743,53031
  • Loading branch information
openshift-merge-bot[bot] committed May 27, 2024
2 parents 88e6525 + 2bd1910 commit 302906f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 28 deletions.
2 changes: 1 addition & 1 deletion tests/e2e/test_rosacli_idp.go
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,6 @@ var _ = Describe("Edit IDP",
textData = rosaClient.Parser.TextData.Input(output).Parse().Tip()
textData = strings.TrimSuffix(textData, "\n")
textData += "!(NOVERB)"
Expect(textData).Should(ContainSubstring("Failed to add IDP to cluster '%s': Invalid username '%s': Username must not contain /, :, or %", clusterID, invalidUserName))
Expect(textData).Should(ContainSubstring("invalid username '%s': Username must not contain /, :, or %", clusterID, invalidUserName))
})
})
25 changes: 0 additions & 25 deletions tests/e2e/test_rosacli_node_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -580,26 +580,6 @@ var _ = Describe("Edit nodepool",
defaultNodePoolReplicas,
"--version",
testVersion)

lowerVersionsList, err := clusterVersionList.FilterVersionsLowerThan(clusterVersion)
Expect(err).ToNot(HaveOccurred())
if lowerVersionsList.Len() > 0 {
By("Edit nodepool version should fail")
nodePoolName := common.GenerateRandomName("np-61139", 2)
lowerVersionsList.Sort(true)
testVersion := lowerVersionsList.OpenShiftVersions[0].Version
_, err := machinePoolService.CreateMachinePool(clusterID, nodePoolName,
"--replicas",
defaultNodePoolReplicas,
"--version",
testVersion)
Expect(err).ToNot(HaveOccurred())

output, err := machinePoolService.EditMachinePool(clusterID, nodePoolName, "--version", clusterVersion)
Expect(err).To(HaveOccurred())
textData := rosaClient.Parser.TextData.Input(output).Parse().Tip()
Expect(textData).Should(ContainSubstring(`ERR: Editing versions is not supported, for upgrades please use 'rosa upgrade machinepool'`))
}
})

It("can list/describe/delete nodepool upgrade policies - [id:67414]",
Expand Down Expand Up @@ -806,11 +786,6 @@ var _ = Describe("Edit nodepool",
Expect(err).ToNot(HaveOccurred())
Expect(rosaClient.Parser.TextData.Input(output).Parse().Tip()).To(ContainSubstring("Machine pool '%s' created successfully on hosted cluster '%s'", machinepoolName, clusterID))

By("Try to edit the version of the machinepool")
output, err = machinePoolService.EditMachinePool(clusterID, machinepoolName, "--version", "4.15.2")
Expect(err).To(HaveOccurred())
Expect(rosaClient.Parser.TextData.Input(output).Parse().Tip()).To(ContainSubstring("Editing versions is not supported, for upgrades please use 'rosa upgrade machinepool'"))

By("Try to edit the replicas of the machinepool with negative value")
output, err = machinePoolService.EditMachinePool(clusterID, machinepoolName, "--replicas", "-9")
Expect(err).To(HaveOccurred())
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/test_rosacli_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ var _ = Describe("Get CLI version",
By("Get the version output")
buf, err = rosaClient.Runner.Cmd("version").Run()
Expect(err).To(BeNil())
stdout = rosaClient.Parser.TextData.Input(buf).Parse().Tip()
stdout = rosaClient.Parser.TextData.Input(buf).Parse().Output()
By("Check the version output")
Expect(stdout).NotTo(ContainSubstring("Not logged in"))
Expect(stdout).To(ContainSubstring(info.Version))

By("Get the client version output")
buf, err = rosaClient.Runner.Cmd("version", "--client").Run()
Expect(err).To(BeNil())
stdout = rosaClient.Parser.TextData.Input(buf).Parse().Tip()
stdout = rosaClient.Parser.TextData.Input(buf).Parse().Output()
By("Check the client version output")
Expect(stdout).NotTo(ContainSubstring("Not logged in"))
Expect(stdout).To(ContainSubstring(info.Version))
Expand Down

0 comments on commit 302906f

Please sign in to comment.