Skip to content

Commit

Permalink
OCM-9935 | test: fix ids: 60688,73731 to use cluster service to confi…
Browse files Browse the repository at this point in the history
…rm if the cluster is hcp
  • Loading branch information
yuwang-RH committed Jul 26, 2024
1 parent 67fbdec commit b291b83
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
6 changes: 3 additions & 3 deletions tests/e2e/test_rosacli_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -1756,7 +1756,6 @@ var _ = Describe("Reusing opeartor prefix and oidc config to create clsuter", la
oidcConfigToClean string
ocmResourceService rosacli.OCMResourceService
originalMajorMinorVerson string
clusterConfig *config.ClusterConfig
clusterService rosacli.ClusterService
awsClient *aws_client.AWSClient
operatorPolicyArn string
Expand All @@ -1770,7 +1769,6 @@ var _ = Describe("Reusing opeartor prefix and oidc config to create clsuter", la
ocmResourceService = rosaClient.OCMResource
clusterService = rosaClient.Cluster
profile = profilehandler.LoadProfileYamlFileByENV()
clusterConfig, err = config.ParseClusterProfile()
Expect(err).ToNot(HaveOccurred())

awsClient, err = aws_client.CreateAWSClient("", "")
Expand Down Expand Up @@ -1858,7 +1856,9 @@ var _ = Describe("Reusing opeartor prefix and oidc config to create clsuter", la
originalMajorMinorVerson = fmt.Sprintf("%d.%d", major, minor)
testingRoleVersion := fmt.Sprintf("%d.%d", major, minor-1)

if !clusterConfig.Hypershift {
isHosted, err := clusterService.IsHostedCPCluster(clusterID)
Expect(err).ToNot(HaveOccurred())
if !isHosted {
By("Update the all operator policies tags to low version")
_, roleName, err := common.ParseRoleARN(operatorRolesArns[1])
Expect(err).To(BeNil())
Expand Down
9 changes: 3 additions & 6 deletions tests/e2e/test_rosacli_upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ var _ = Describe("Cluster Upgrade testing",
arbitraryPoliciesToClean []string
awsClient *aws_client.AWSClient
profile *profilehandler.Profile
clusterConfig *config.ClusterConfig
err error
)

BeforeEach(func() {
Expand All @@ -43,9 +41,6 @@ var _ = Describe("Cluster Upgrade testing",
arbitraryPolicyService = rosaClient.Policy
clusterService = rosaClient.Cluster

clusterConfig, err = config.ParseClusterProfile()
Expect(err).ToNot(HaveOccurred())

By("Load the profile")
profile = profilehandler.LoadProfileYamlFileByENV()
})
Expand Down Expand Up @@ -214,7 +209,9 @@ var _ = Describe("Cluster Upgrade testing",
Expect(err).To(BeNil())
Expect(len(policy.Tags)).To(Equal(0))
}
if !clusterConfig.Hypershift {
isHosted, err := clusterService.IsHostedCPCluster(clusterID)
Expect(err).ToNot(HaveOccurred())
if !isHosted {
By("Update the all operator policies tags to low version")
tagName := "rosa_openshift_version"
clusterMajorVersion := common.SplitMajorVersion(clusterVersion)
Expand Down

0 comments on commit b291b83

Please sign in to comment.