Skip to content

Commit 0468c3f

Browse files
committed
Partially fix integration test
Signed-off-by: Neo2308 <[email protected]>
1 parent a619489 commit 0468c3f

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

test/integration/packagemanifests_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
package integration
1616

1717
import (
18+
"fmt"
1819
. "github.com/onsi/ginkgo/v2"
1920
. "github.com/onsi/gomega"
2021
)
@@ -35,14 +36,14 @@ var _ = Describe("run packagemanifests", func() {
3536
It("should handle existing operator deployments correctly", func() {
3637
output, err = cleanup(&tc)
3738
Expect(err).NotTo(HaveOccurred())
38-
Expect(output).To(ContainSubstring(`package \"memcached-operator\" not found`))
39+
Expect(output).To(ContainSubstring(fmt.Sprintf(`package \"e2e-%s\" not found`, tc.TestSuffix)))
3940
Expect(runPackageManifests(&tc, "--version", "0.0.1")).To(Succeed())
4041
Expect(runPackageManifests(&tc, "--version", "0.0.1")).NotTo(Succeed())
4142
_, err = cleanup(&tc)
4243
Expect(err).NotTo(HaveOccurred())
4344
output, err = cleanup(&tc)
4445
Expect(err).NotTo(HaveOccurred())
45-
Expect(output).To(ContainSubstring(`package \"memcached-operator\" not found`))
46+
Expect(output).To(ContainSubstring(fmt.Sprintf(`package \"e2e-%s\" not found`, tc.TestSuffix)))
4647
})
4748

4849
It("should succeed with a single operator version in AllNamespaces mode", func() {

test/integration/suite_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ func runPackageManifests(tc *testutils.TestContext, args ...string) error {
139139
}
140140

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

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

0 commit comments

Comments
 (0)