Skip to content

Commit

Permalink
OCM-10922 | test: Automated ids:60083
Browse files Browse the repository at this point in the history
  • Loading branch information
86254860 committed Sep 20, 2024
1 parent c38480c commit c1241e0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/e2e/hcp_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,25 @@ var _ = Describe("HCP cluster testing",
Expect(output.String()).To(ContainSubstring("--enable-customer-managed-key"))

By("Get cluster description")
output, err = clusterService.DescribeCluster(clusterID)
Expect(err).To(BeNil())
clusterDetail, err := clusterService.ReflectClusterDescription(output)
Expect(err).To(BeNil())

if clusterConfig.EtcdEncryption {
Expect(clusterDetail.EnableEtcdEncryption).To(Equal("Enabled"))
Expect(clusterDetail.EtcdKmsKeyARN).To(Equal(clusterConfig.Encryption.EtcdEncryptionKmsArn))
} else {
Expect(clusterDetail.EnableEtcdEncryption).To(Equal("Disabled"))
}

By("Get cluster description in JSON format")
jsonData, err := clusterService.GetJSONClusterDescription(clusterID)
Expect(err).To(BeNil())

enableEtcdEncryption := jsonData.DigBool("etcd_encryption")
Expect(clusterConfig.EtcdEncryption).To(Equal(enableEtcdEncryption))

ectdKMS := jsonData.DigString("aws", "etcd_encryption", "kms_key_arn")
npKMS := jsonData.DigString("aws", "kms_key_arn")

Expand Down
2 changes: 2 additions & 0 deletions tests/utils/exec/rosacli/cluster_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ type ClusterDescription struct {
FailedInflightChecks string `yaml:"Failed Inflight Checks,omitempty"`
ExternalAuthentication string `yaml:"External Authentication,omitempty"`
EnableDeleteProtection string `yaml:"Delete Protection,omitempty"`
EnableEtcdEncryption string `yaml:"Etcd Encryption,omitempty"`
EtcdKmsKeyARN string `yaml:"Etcd KMS key ARN,omitempty"`
}

// Pasrse the result of 'rosa list cluster' to the ClusterList struct
Expand Down

0 comments on commit c1241e0

Please sign in to comment.