From 10c7ea2ef493e5768a74a38f826a1887b058be90 Mon Sep 17 00:00:00 2001 From: Jericho Keyne Date: Thu, 19 Dec 2024 12:31:46 -0500 Subject: [PATCH] OCM-13194 | ci: Fixing id:72514,id:68939,id:63139,id:63152 and updating proxy image --- tests/e2e/classic_machine_pool_test.go | 8 ++++---- tests/e2e/cluster_upgrade_test.go | 12 +++++++----- tests/e2e/hcp_machine_pool_test.go | 2 +- tests/e2e/idps_test.go | 7 +------ tests/tf-manifests/aws/proxy/main.tf | 2 +- tests/tf-manifests/rhcs/idps/github/main.tf | 3 ++- tests/tf-manifests/rhcs/idps/github/variables.tf | 5 +++++ 7 files changed, 21 insertions(+), 18 deletions(-) diff --git a/tests/e2e/classic_machine_pool_test.go b/tests/e2e/classic_machine_pool_test.go index 013234b9..42fbbb00 100644 --- a/tests/e2e/classic_machine_pool_test.go +++ b/tests/e2e/classic_machine_pool_test.go @@ -706,9 +706,9 @@ var _ = Describe("Create MachinePool", ci.Day2, ci.FeatureMachinepool, func() { MachineType: helper.StringPointer("invalid"), Name: helper.StringPointer("invalidinstype"), } - output, err = mpService.Apply(mpArgs) + _, err = mpService.Apply(mpArgs) Expect(err).To(HaveOccurred()) - Expect(output).Should(ContainSubstring("Machine type 'invalid' is not supported")) + Expect(helper.GetTFErrorMessage(err)).Should(ContainSubstring("Machine type 'invalid' is not supported")) By("Create machinepool creation plan with invalid tags") invalidTags := map[string]string{ @@ -725,9 +725,9 @@ var _ = Describe("Create MachinePool", ci.Day2, ci.FeatureMachinepool, func() { Name: helper.StringPointer(name), Tags: helper.StringMapPointer(invalidTags), } - output, err = mpService.Apply(mpArgs) + _, err = mpService.Apply(mpArgs) Expect(err).To(HaveOccurred()) - Expect(output).Should(ContainSubstring("Tags that begin with 'aws:' are reserved")) + Expect(helper.GetTFErrorMessage(err)).Should(ContainSubstring("Tags that begin with 'aws:' are reserved")) }) }) diff --git a/tests/e2e/cluster_upgrade_test.go b/tests/e2e/cluster_upgrade_test.go index e63d1566..0361924d 100644 --- a/tests/e2e/cluster_upgrade_test.go +++ b/tests/e2e/cluster_upgrade_test.go @@ -148,13 +148,15 @@ var _ = Describe("Upgrade", func() { } - By("Validate the cluster Upgrade upgrade_acknowledge field") - clusterArgs.OpenshiftVersion = helper.StringPointer(targetV) - _, err = clusterService.Apply(clusterArgs) - Expect(err).To(HaveOccurred()) - Expect(err.Error()).To(ContainSubstring("Missing required acknowledgements to schedule upgrade")) + // Blocked by OCM-7641 + // By("Validate the cluster Upgrade upgrade_acknowledge field") + // clusterArgs.OpenshiftVersion = helper.StringPointer(targetV) + // _, err = clusterService.Apply(clusterArgs) + // Expect(err).To(HaveOccurred()) + // Expect(err.Error()).To(ContainSubstring("Missing required acknowledgements to schedule upgrade")) By("Apply the cluster Upgrade") + clusterArgs.OpenshiftVersion = helper.StringPointer(targetV) clusterArgs.UpgradeAcknowledgementsFor = helper.StringPointer(majorVersion) _, err = clusterService.Apply(clusterArgs) Expect(err).ToNot(HaveOccurred()) diff --git a/tests/e2e/hcp_machine_pool_test.go b/tests/e2e/hcp_machine_pool_test.go index 7bcf9e51..9403526c 100644 --- a/tests/e2e/hcp_machine_pool_test.go +++ b/tests/e2e/hcp_machine_pool_test.go @@ -855,7 +855,7 @@ var _ = Describe("HCP MachinePool", ci.Day2, ci.FeatureMachinepool, func() { By("Try to create a nodepool with wrong version") validateMPArgAgainstErrorSubstrings(mpName, func(args *exec.MachinePoolArgs) { args.OpenshiftVersion = helper.StringPointer("any_version") - }, "'openshift-vany_version-candidate' not found") + }, "'openshift-vany_version' not found") By("Try to create a nodepool with autoscaling enabled and without min replicas") validateMPArgAgainstErrorSubstrings(mpName, func(args *exec.MachinePoolArgs) { diff --git a/tests/e2e/idps_test.go b/tests/e2e/idps_test.go index 71612608..682f2d87 100644 --- a/tests/e2e/idps_test.go +++ b/tests/e2e/idps_test.go @@ -703,17 +703,12 @@ var _ = Describe("Identity Providers", ci.Day2, ci.FeatureIDP, func() { By("Create github idp with hostname myhost.com/aa") args = getDefaultGitHubArgs(idpName) args.HostedDomain = helper.StringPointer("myhost.com/aa") - validateIDPArgAgainstNoError(idpServices.github, args) + validateIDPArgAgainstErrorSubstrings(idpServices.github, args, "hostname must be a valid DNS subdomain or IP address") By("Create github idp with hostname example.com") args = getDefaultGitHubArgs(idpName) args.HostedDomain = helper.StringPointer("example.com") validateIDPArgAgainstNoError(idpServices.github, args) - - By("Create github idp with empty hostname") - args = getDefaultGitHubArgs(idpName) - args.HostedDomain = helper.EmptyStringPointer - validateIDPArgAgainstErrorSubstrings(idpServices.github, args, "Attribute 'hostname' is mandatory") }) It("htpasswd with empty user-password list will fail - [id:66409]", ci.Medium, func() { diff --git a/tests/tf-manifests/aws/proxy/main.tf b/tests/tf-manifests/aws/proxy/main.tf index 458e961c..465fa6d3 100644 --- a/tests/tf-manifests/aws/proxy/main.tf +++ b/tests/tf-manifests/aws/proxy/main.tf @@ -12,7 +12,7 @@ provider "aws" { } locals { - proxy_image_name = "al2023-ami-2023.5.20241001.1-kernel-6.1-x86_64" + proxy_image_name = "al2023-ami-2023.6.20241212.0-kernel-6.1-x86_64" } data "aws_ami" "proxy_img" { diff --git a/tests/tf-manifests/rhcs/idps/github/main.tf b/tests/tf-manifests/rhcs/idps/github/main.tf index d2f43966..a60fc38b 100644 --- a/tests/tf-manifests/rhcs/idps/github/main.tf +++ b/tests/tf-manifests/rhcs/idps/github/main.tf @@ -33,5 +33,6 @@ resource "rhcs_identity_provider" "github_idp" { client_id = var.client_id client_secret = var.client_secret organizations = var.organizations + hostname = var.hosted_domain } -} \ No newline at end of file +} diff --git a/tests/tf-manifests/rhcs/idps/github/variables.tf b/tests/tf-manifests/rhcs/idps/github/variables.tf index da545b8e..cc078449 100644 --- a/tests/tf-manifests/rhcs/idps/github/variables.tf +++ b/tests/tf-manifests/rhcs/idps/github/variables.tf @@ -25,3 +25,8 @@ variable "organizations" { variable "name" { type = string } + +variable "hosted_domain" { + type = string + default = null +}