Skip to content

Commit

Permalink
update packagemanifests tests to use AllNamespaces mode
Browse files Browse the repository at this point in the history
as the go/v4 testdata uses mutating webhooks and requires
supporting only AllNamespaces mode as per OLM requirements

Signed-off-by: everettraven <everettraven@gmail.com>
  • Loading branch information
everettraven committed Jan 29, 2024
1 parent 04c111b commit 2f82cad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions test/integration/packagemanifests_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ var _ = Describe("run packagemanifests", func() {
Expect(output).To(ContainSubstring(`package \"memcached-operator\" not found`))
})

It("should succeed with a single operator version in OwnNamespace mode", func() {
Expect(runPackageManifests(&tc, "--install-mode", "OwnNamespace", "--version", "0.0.1")).To(Succeed())
It("should succeed with a single operator version in AllNamespaces mode", func() {
Expect(runPackageManifests(&tc, "--install-mode", "AllNamespaces", "--version", "0.0.1")).To(Succeed())
})
})
6 changes: 4 additions & 2 deletions test/integration/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,14 @@ var _ = BeforeSuite(func() {
Expect(tc.LoadImageToKindCluster()).To(Succeed())
}

By("generating the operator package manifests and enabling all InstallModes")
By("generating the operator package manifests and enabling AllNamespaces InstallMode")
Expect(tc.Make("packagemanifests", "IMG="+tc.ImageName)).To(Succeed())
csv, err := readCSV(&tc, "0.0.1", false)
Expect(err).NotTo(HaveOccurred())
for i := range csv.Spec.InstallModes {
csv.Spec.InstallModes[i].Supported = true
if csv.Spec.InstallModes[i].Type == "AllNamespaces" {
csv.Spec.InstallModes[i].Supported = true
}
}
Expect(writeCSV(&tc, "0.0.1", csv, false)).To(Succeed())

Expand Down

0 comments on commit 2f82cad

Please sign in to comment.