Skip to content

Commit

Permalink
Revert "Partially fix integration test"
Browse files Browse the repository at this point in the history
This reverts commit 0468c3f.
  • Loading branch information
Neo2308 committed Oct 29, 2024
1 parent 0468c3f commit e7ceea1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions test/integration/packagemanifests_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package integration

import (
"fmt"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
Expand All @@ -36,14 +35,14 @@ var _ = Describe("run packagemanifests", func() {
It("should handle existing operator deployments correctly", func() {
output, err = cleanup(&tc)
Expect(err).NotTo(HaveOccurred())
Expect(output).To(ContainSubstring(fmt.Sprintf(`package \"e2e-%s\" not found`, tc.TestSuffix)))
Expect(output).To(ContainSubstring(`package \"memcached-operator\" not found`))
Expect(runPackageManifests(&tc, "--version", "0.0.1")).To(Succeed())
Expect(runPackageManifests(&tc, "--version", "0.0.1")).NotTo(Succeed())
_, err = cleanup(&tc)
Expect(err).NotTo(HaveOccurred())
output, err = cleanup(&tc)
Expect(err).NotTo(HaveOccurred())
Expect(output).To(ContainSubstring(fmt.Sprintf(`package \"e2e-%s\" not found`, tc.TestSuffix)))
Expect(output).To(ContainSubstring(`package \"memcached-operator\" not found`))
})

It("should succeed with a single operator version in AllNamespaces mode", func() {
Expand Down
4 changes: 2 additions & 2 deletions test/integration/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func runPackageManifests(tc *testutils.TestContext, args ...string) error {
}

func cleanup(tc *testutils.TestContext) (string, error) {
allArgs := []string{"cleanup", fmt.Sprintf("e2e-%s", tc.TestSuffix), "--timeout", "4m", "--namespace", tc.Kubectl.Namespace}
allArgs := []string{"cleanup", tc.ProjectName, "--timeout", "4m", "--namespace", tc.Kubectl.Namespace}
output, err := tc.Run(exec.Command(tc.BinaryName, allArgs...))
if err == nil {
fmt.Fprintln(GinkgoWriter, string(output))
Expand Down Expand Up @@ -178,7 +178,7 @@ func writeCSV(tc *testutils.TestContext, version string, csv *v1alpha1.ClusterSe
}

func csvPath(tc *testutils.TestContext, version string, isBundle bool) string {
fileName := fmt.Sprintf("e2e-%s.clusterserviceversion.yaml", tc.TestSuffix)
fileName := fmt.Sprintf("%s.clusterserviceversion.yaml", tc.ProjectName)
if isBundle {
return filepath.Join(tc.Dir, "bundle", bundle.ManifestsDir, fileName)
}
Expand Down

0 comments on commit e7ceea1

Please sign in to comment.