Skip to content

Commit

Permalink
OCM-8772 | test: Automated case id:46312,74436 Create cluster with fips
Browse files Browse the repository at this point in the history
  • Loading branch information
jameszwang committed Jun 20, 2024
1 parent 945bd95 commit 8a8267f
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/e2e/test_rosacli_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,20 @@ var _ = Describe("Classic cluster creation validation",
Expect(err).NotTo(BeNil())
Expect(errorOutput.String()).To(ContainSubstring("Expected a valid OpenShift version: A valid version number must be specified"))
})

It("to validate to create the cluster with setting 'fips' flag but '--etcd-encryption=false' - [id:74436]",
labels.Medium, labels.Runtime.Day1Negative,
func() {
clusterService := rosaClient.Cluster
clusterName := "ocp-74436"

By("Create cluster with fips flag but '--etcd-encryption=false")
errorOutput, err := clusterService.CreateDryRun(
clusterName, "--fips", "--etcd-encryption=false",
)
Expect(err).NotTo(BeNil())
Expect(errorOutput.String()).To(ContainSubstring("etcd encryption cannot be disabled on clusters with FIPS mode"))
})
})

var _ = Describe("Classic cluster deletion validation",
Expand Down
17 changes: 17 additions & 0 deletions tests/e2e/test_rosacli_cluster_post.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,23 @@ var _ = Describe("Healthy check",
etcdEncryption := jsonData.DigBool("etcd_encryption")
Expect(etcdEncryption).To(BeTrue())
})

It("Rosa cluster with fips enabled can be created successfully - [id:46312]",
labels.Critical, labels.Runtime.Day1Post,
func() {
profile := profilehandler.LoadProfileYamlFileByENV()
output, err := clusterService.DescribeCluster(clusterID)
Expect(err).ToNot(HaveOccurred())
des, err := clusterService.ReflectClusterDescription(output)
Expect(err).ToNot(HaveOccurred())

By("Check if fips is enabled")
if !profile.ClusterConfig.FIPS {
Expect(des.FIPSMod).To(Equal(""))
} else {
Expect(des.FIPSMod).To(Equal("Enabled"))
}
})
})

var _ = Describe("Create cluster with the version in some channel group testing",
Expand Down

0 comments on commit 8a8267f

Please sign in to comment.