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-6309 | ci: Verify test case(s) 43051|57441|62083|52580|43046|66359|57056|57570 #1921

Merged
merged 1 commit into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
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
13 changes: 2 additions & 11 deletions tests/e2e/test_rosacli_iam_roles.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ package e2e
import (
"fmt"
"math/rand"
// "regexp"
// "strings"
"time"

. "github.com/onsi/ginkgo/v2"
Expand Down Expand Up @@ -523,8 +521,6 @@ var _ = Describe("Edit IAM",

It("can validate when user create operator-roles to cluster - [id:43051]",
labels.High,
labels.MigrationToVerify,
labels.Exclude,
func() {
By("Check if cluster is sts cluster")
StsCluster, err := clusterService.IsSTSCluster(clusterID)
Expand Down Expand Up @@ -565,8 +561,6 @@ var _ = Describe("Edit IAM",

It("can validate that upgrade account-roles with the managed policies should be forbidden - [id:57441]",
labels.High,
labels.MigrationToVerify,
labels.Exclude,
func() {
defer func() {
By("Cleanup created account-roles in high level of the test case")
Expand Down Expand Up @@ -627,8 +621,6 @@ var _ = Describe("Edit IAM",

It("can delete account-roles with --hosted-cp and --classic - [id:62083]",
labels.High,
labels.MigrationToVerify,
labels.Exclude,
func() {
defer func() {
By("Cleanup created account-roles in high level of the test case")
Expand Down Expand Up @@ -684,8 +676,6 @@ var _ = Describe("Edit IAM",

It("can validate create/link/unlink user-role - [id:52580]",
labels.High,
labels.MigrationToVerify,
labels.Exclude,
func() {
var (
userRolePrefix string
Expand Down Expand Up @@ -731,7 +721,8 @@ var _ = Describe("Edit IAM",
"-y")
Expect(err).NotTo(BeNil())
textData = rosaClient.Parser.TextData.Input(output).Parse().Tip()
Expect(textData).Should(ContainSubstring("There was an error creating the ocm user role: NoSuchEntity"))
Expect(textData).Should(ContainSubstring("There was an error creating the ocm user role: operation error IAM: CreateRole"))
Expect(textData).Should(ContainSubstring("api error NoSuchEntity"))

By("Create an user-role")
output, err = ocmResourceService.CreateUserRole("--mode", "auto",
Expand Down
4 changes: 3 additions & 1 deletion tests/e2e/test_rosacli_idp.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ var _ = Describe("Edit IDP",
idpService = rosaClient.IDP
rosaSensitiveClient = rosacli.NewSensitiveClient()
idpServiceSensitive = rosaSensitiveClient.IDP

})

AfterEach(func() {
Expand All @@ -50,6 +51,7 @@ var _ = Describe("Edit IDP",
errorList = append(errorList, rosaClient.CleanResources(clusterID))
errorList = append(errorList, rosaSensitiveClient.CleanResources(clusterID))
Expect(errors.Join(errorList...)).ToNot(HaveOccurred())

})

It("can create/describe/delete admin user - [id:35878]",
Expand All @@ -64,7 +66,7 @@ var _ = Describe("Edit IDP",
)

By("Create admin")
output, err := rosaSensitiveClient.User.CreateAdmin(clusterID)
output, err := rosaClient.User.CreateAdmin(clusterID)
Expect(err).To(BeNil())
textData := rosaClient.Parser.TextData.Input(output).Parse().Tip()
Expect(textData).Should(ContainSubstring("Admin account has been added"))
Expand Down
2 changes: 0 additions & 2 deletions tests/e2e/test_rosacli_oidc_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ var _ = Describe("Edit OIDC config",

It("can create/list/delete BYO oidc config in auto mode - [id:57570]",
labels.High,
labels.MigrationToVerify,
labels.Exclude,
func() {
defer func() {
By("make sure that all oidc configs created during the testing")
Expand Down
2 changes: 0 additions & 2 deletions tests/e2e/test_rosacli_oidc_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ var _ = Describe("OIDC provider",

It("validate when user create oidc-provider to cluster - [id:43046]",
labels.High,
labels.MigrationToVerify,
labels.Exclude,
func() {
By("Check if cluster is sts cluster")
StsCluster, err := clusterService.IsSTSCluster(clusterID)
Expand Down
14 changes: 7 additions & 7 deletions tests/e2e/test_rosacli_verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ var _ = Describe("Verify",

It("the creation of rosa cluster with volume size will work - [id:66359]",
labels.Critical,
labels.MigrationToVerify,
labels.Exclude,
func() {
By("Classic cluster check")
isHosted, err := clusterService.IsHostedCPCluster(clusterID)
Expand Down Expand Up @@ -95,8 +93,6 @@ var _ = Describe("Verify",

It("the creation of ROSA cluster with default-mp-labels option will succeed - [id:57056]",
labels.Critical,
labels.MigrationToVerify,
labels.Exclude,
func() {
By("Classic cluster check")
isHosted, err := clusterService.IsHostedCPCluster(clusterID)
Expand All @@ -106,7 +102,7 @@ var _ = Describe("Verify",
}

By("Check the cluster config")
mpLables := strings.Join(strings.Split(clusterConfig.DefaultMpLabels, ","), ", ")
mpLables := strings.Split(clusterConfig.DefaultMpLabels, ",")

By("Check the machinepool list")
output, err := machinePoolService.ListMachinePool(clusterID)
Expand All @@ -117,15 +113,19 @@ var _ = Describe("Verify",

workPool := mplist.Machinepool(constants.DefaultClassicWorkerPool)
Expect(workPool).ToNot(BeNil(), "worker pool is not found for the cluster")
Expect(workPool.Labels).To(Equal(mpLables))
for _, label := range mpLables {
Expect(workPool.Labels).To(ContainSubstring(label))
}

By("Check the default worker pool description")
output, err = machinePoolService.DescribeMachinePool(clusterID, constants.DefaultClassicWorkerPool)
Expect(err).ToNot(HaveOccurred())

mpD, err := machinePoolService.ReflectMachinePoolDescription(output)
Expect(err).ToNot(HaveOccurred())
Expect(mpD.Labels).To(Equal(mpLables))
for _, label := range mpLables {
Expect(mpD.Labels).To(ContainSubstring(label))
}

})

Expand Down