Skip to content

Commit df391ec

Browse files
Srihari1192ntkathole
authored andcommitted
fix: Correct namespace reference in remote Feast project setup for operator upgrade and previous version tests
Signed-off-by: Srihari <[email protected]>
1 parent b8b7831 commit df391ec

File tree

2 files changed

+30
-4
lines changed

2 files changed

+30
-4
lines changed

infra/feast-operator/test/previous-version/previous_version_test.go

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,30 @@ limitations under the License.
1717
package previous_version
1818

1919
import (
20+
"fmt"
21+
2022
"github.com/feast-dev/feast/infra/feast-operator/test/utils"
2123
. "github.com/onsi/ginkgo/v2"
24+
. "github.com/onsi/gomega"
2225
)
2326

2427
var _ = Describe("previous version operator", Ordered, func() {
28+
namespace := "test-ns-feast"
29+
2530
BeforeAll(func() {
2631
utils.DeployPreviousVersionOperator()
32+
33+
By(fmt.Sprintf("Creating test namespace: %s", namespace))
34+
err := utils.CreateNamespace(namespace, "/test/e2e")
35+
Expect(err).ToNot(HaveOccurred(), fmt.Sprintf("failed to create namespace %s", namespace))
2736
})
2837

2938
AfterAll(func() {
3039
utils.DeleteOperatorDeployment("/test/upgrade")
40+
41+
By(fmt.Sprintf("Deleting test namespace: %s", namespace))
42+
err := utils.DeleteNamespace(namespace, "/test/e2e")
43+
Expect(err).ToNot(HaveOccurred(), fmt.Sprintf("failed to delete namespace %s", namespace))
3144
})
3245

3346
Context("Previous version operator Tests", func() {
@@ -38,9 +51,9 @@ var _ = Describe("previous version operator", Ordered, func() {
3851
}
3952

4053
runTestDeploySimpleCRFunc := utils.GetTestDeploySimpleCRFunc("/test/upgrade", utils.GetSimplePreviousVerCR(),
41-
utils.FeatureStoreName, utils.FeastResourceName, feastK8sResourceNames, "default")
54+
utils.FeatureStoreName, utils.FeastResourceName, feastK8sResourceNames, namespace)
4255
runTestWithRemoteRegistryFunction := utils.GetTestWithRemoteRegistryFunc("/test/upgrade", utils.GetSimplePreviousVerCR(),
43-
utils.GetRemoteRegistryPreviousVerCR(), utils.FeatureStoreName, utils.FeastResourceName, feastK8sResourceNames, "default")
56+
utils.GetRemoteRegistryPreviousVerCR(), utils.FeatureStoreName, utils.FeastResourceName, feastK8sResourceNames, namespace)
4457

4558
// Run Test on previous version operator
4659
It("Should be able to deploy and run a default feature store CR successfully", runTestDeploySimpleCRFunc)

infra/feast-operator/test/upgrade/upgrade_test.go

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,38 @@ limitations under the License.
1717
package previous_version
1818

1919
import (
20+
"fmt"
21+
2022
"github.com/feast-dev/feast/infra/feast-operator/test/utils"
2123
. "github.com/onsi/ginkgo/v2"
24+
. "github.com/onsi/gomega"
2225
)
2326

2427
var _ = Describe("operator upgrade", Ordered, func() {
28+
namespace := "test-ns-feast"
29+
2530
BeforeAll(func() {
2631
utils.DeployPreviousVersionOperator()
2732
utils.DeployOperatorFromCode("/test/e2e", true)
33+
34+
By(fmt.Sprintf("Creating test namespace: %s", namespace))
35+
err := utils.CreateNamespace(namespace, "/test/e2e")
36+
Expect(err).ToNot(HaveOccurred(), fmt.Sprintf("failed to create namespace %s", namespace))
2837
})
2938

3039
AfterAll(func() {
3140
utils.DeleteOperatorDeployment("/test/e2e")
41+
42+
By(fmt.Sprintf("Deleting test namespace: %s", namespace))
43+
err := utils.DeleteNamespace(namespace, "/test/e2e")
44+
Expect(err).ToNot(HaveOccurred(), fmt.Sprintf("failed to delete namespace %s", namespace))
3245
})
3346

3447
Context("Operator upgrade Tests", func() {
3548
runTestDeploySimpleCRFunc := utils.GetTestDeploySimpleCRFunc("/test/upgrade", utils.GetSimplePreviousVerCR(),
36-
utils.FeatureStoreName, utils.FeastResourceName, []string{}, "default")
49+
utils.FeatureStoreName, utils.FeastResourceName, []string{}, namespace)
3750
runTestWithRemoteRegistryFunction := utils.GetTestWithRemoteRegistryFunc("/test/upgrade", utils.GetSimplePreviousVerCR(),
38-
utils.GetRemoteRegistryPreviousVerCR(), utils.FeatureStoreName, utils.FeastResourceName, []string{}, "default")
51+
utils.GetRemoteRegistryPreviousVerCR(), utils.FeatureStoreName, utils.FeastResourceName, []string{}, namespace)
3952

4053
// Run Test on current version operator with previous version CR
4154
It("Should be able to deploy and run a default feature store CR successfully", runTestDeploySimpleCRFunc)

0 commit comments

Comments
 (0)