Pass CRDs on createion of kube instance

This commit is contained in:
Volodymyr Zotov
2025-08-27 11:19:17 -05:00
parent a1cbd40f9e
commit f7f5462133
2 changed files with 106 additions and 14 deletions

View File

@@ -17,6 +17,7 @@ import (
"github.com/1Password/onepassword-operator/pkg/testhelper/kube"
"github.com/1Password/onepassword-operator/pkg/testhelper/op"
"github.com/1Password/onepassword-operator/pkg/testhelper/operator"
"github.com/1Password/onepassword-operator/pkg/testhelper/system"
)
const (
@@ -30,6 +31,9 @@ var _ = Describe("Onepassword Operator e2e", Ordered, func() {
ctx := context.Background()
BeforeAll(func() {
rootDir, err := system.GetProjectRoot()
Expect(err).NotTo(HaveOccurred())
kubeClient = kube.NewKubeClient(&kube.Config{
Namespace: "default",
ManifestsDir: filepath.Join("manifests"),
@@ -37,6 +41,9 @@ var _ = Describe("Onepassword Operator e2e", Ordered, func() {
Timeout: defaults.E2ETimeout,
Interval: defaults.E2EInterval,
},
CRDs: []string{
filepath.Join(rootDir, "config", "crd", "bases", "onepassword.com_onepassworditems.yaml"),
},
})
operator.BuildOperatorImage()