diff --git a/tests/ci/data/profiles/rosa-hcp.yaml b/tests/ci/data/profiles/rosa-hcp.yaml index e1d51405d..37e7843d1 100644 --- a/tests/ci/data/profiles/rosa-hcp.yaml +++ b/tests/ci/data/profiles/rosa-hcp.yaml @@ -62,6 +62,34 @@ profiles: account-role: path: "/test/hcp/" permission_boundary: "arn:aws:iam::aws:policy/AdministratorAccess" +- as: rosa-hcp-ze + version: latest + channel_group: stable + region: "us-west-2" + cluster: + multi_az: true + instance_type: "" + hcp: true + sts: true + byo_vpc: true + private: true + additional_principals: false + imdsv2: "" + etcd_encryption: false + autoscale: false + kms_key: false + oidc_config: "managed" + networking: false + proxy_enabled: false + label_enabled: false + tag_enabled: false + zones: "" + registries_config: true + blocked_registries: true + zero_egress: true + account-role: + path: "/test/hcp/" + permission_boundary: "arn:aws:iam::aws:policy/AdministratorAccess" - as: rosa-hcp-upgrade-z-stream version: "z-1" channel_group: stable diff --git a/tests/ci/labels/features.go b/tests/ci/labels/features.go index 5294a1743..cb25389ba 100644 --- a/tests/ci/labels/features.go +++ b/tests/ci/labels/features.go @@ -34,6 +34,7 @@ type featureLabels struct { Upgrade Labels Config Labels Hibernation Labels + ZeroEgress Labels } var Feature = initFeatureLabels() @@ -65,6 +66,7 @@ func initFeatureLabels() *featureLabels { fLabels.Upgrade = Label("feature-upgrade") fLabels.Config = Label("feature-config") fLabels.Hibernation = Label("feature-hibernation") + fLabels.ZeroEgress = Label("feature-zero-egress") return fLabels } diff --git a/tests/ci/labels/labels.md b/tests/ci/labels/labels.md index 47bb8d6ec..58de816b1 100644 --- a/tests/ci/labels/labels.md +++ b/tests/ci/labels/labels.md @@ -85,3 +85,4 @@ It defines which group the test case belongs to. The feature label is always def * labels.Feature.UserRole * labels.Feature.VerifyResources * labels.Feature.Version +* labels.Feature.ZeroEgress diff --git a/tests/e2e/hcp_cluster_test.go b/tests/e2e/hcp_cluster_test.go index d6056ab3e..5b2376e7f 100644 --- a/tests/e2e/hcp_cluster_test.go +++ b/tests/e2e/hcp_cluster_test.go @@ -635,4 +635,16 @@ var _ = Describe("HCP cluster testing", } } }) + + It("create zero-egress HCP cluster - [id:76543]", + labels.High, labels.Feature.ZeroEgress, labels.Runtime.Day1, + func() { + By("Get cluster description") + output, err := clusterService.DescribeCluster(clusterID) + Expect(err).To(BeNil()) + clusterDetail, err := clusterService.ReflectClusterDescription(output) + Expect(err).To(BeNil()) + Expect(clusterDetail.FailedInflightChecks).To(ContainSubstring("Egress URL access issues")) + }) + }) diff --git a/tests/utils/config/cluster.go b/tests/utils/config/cluster.go index 9788c1ebd..a5b69bc79 100644 --- a/tests/utils/config/cluster.go +++ b/tests/utils/config/cluster.go @@ -21,6 +21,7 @@ type Encryption struct { type Properties struct { ProvisionShardID string `json:"provision_shard_id,omitempty"` + ZeroEgress bool `json:"zero_egress,omitempty"` } type Sts struct { diff --git a/tests/utils/handler/cluster_handler.go b/tests/utils/handler/cluster_handler.go index dafa93e04..ab0bb231b 100644 --- a/tests/utils/handler/cluster_handler.go +++ b/tests/utils/handler/cluster_handler.go @@ -674,6 +674,12 @@ func (ch *clusterHandler) GenerateClusterCreateFlags() ([]string, error) { ProvisionShardID: ch.profile.ClusterConfig.ProvisionShard, } } + if ch.profile.ClusterConfig.ZeroEgress { + flags = append(flags, "--properties", fmt.Sprintf("zero_egress:%t", ch.profile.ClusterConfig.ZeroEgress)) + ch.clusterConfig.Properties = &ClusterConfigure.Properties{ + ZeroEgress: ch.profile.ClusterConfig.ZeroEgress, + } + } if ch.profile.ClusterConfig.TagEnabled { tags := "test-tag:tagvalue,qe-managed:true" diff --git a/tests/utils/handler/interface.go b/tests/utils/handler/interface.go index de1a75fb3..731683bb8 100644 --- a/tests/utils/handler/interface.go +++ b/tests/utils/handler/interface.go @@ -61,6 +61,7 @@ type ClusterConfig struct { AllowedRegistries bool `yaml:"allowed_registries" json:"allowed_registries,omitempty"` BlockedRegistries bool `yaml:"blocked_registries" json:"blocked_registries,omitempty"` ManualCreationMode bool `yaml:"manual_creation_mode" json:"manual_creation_mode,omitempty"` + ZeroEgress bool `yaml:"zero_egress" json:"zero_egress,omitempty"` } // Resources will record the resources prepared