Skip to content

Commit a23a461

Browse files
committed
Move external hypervisor CRD out of helm chart
The hypervisor CRD is managed by openstack-hypervisor-operator and should not be deployed by this helm chart. Move it to hack/crds/ for envtest usage only. Update both controller and evacuation test suites to load CRDs from both the helm chart directory and hack/crds/.
1 parent ed3d436 commit a23a461

5 files changed

Lines changed: 10 additions & 2 deletions

File tree

Makefile.maker.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ reuse:
6969
- PROJECT
7070
- config/**
7171
- charts/**
72+
- hack/crds/**
7273
- internal/**/*_mock.go
7374
- build/**
7475
SPDX-FileCopyrightText: 'SAP SE or an SAP affiliate company and cobaltcore-dev contributors'

REUSE.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ path = [
3030
"PROJECT",
3131
"config/**",
3232
"charts/**",
33+
"hack/crds/**",
3334
"internal/**/*_mock.go",
3435
"build/**",
3536
]
File renamed without changes.

internal/controller/suite_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@ var _ = BeforeSuite(func() {
5454

5555
By("bootstrapping test environment")
5656
testEnv = &envtest.Environment{
57-
CRDDirectoryPaths: []string{filepath.Join("..", "..", "charts", "kvm-node-agent", "crds")},
57+
CRDDirectoryPaths: []string{
58+
filepath.Join("..", "..", "charts", "kvm-node-agent", "crds"),
59+
filepath.Join("..", "..", "hack", "crds"),
60+
},
5861
ErrorIfCRDPathMissing: true,
5962

6063
// The BinaryAssetsDirectory is only required if you want to run the tests directly

internal/evacuation/suite_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@ var _ = BeforeSuite(func() {
5454

5555
By("bootstrapping test environment")
5656
testEnv = &envtest.Environment{
57-
CRDDirectoryPaths: []string{filepath.Join("..", "..", "charts", "kvm-node-agent", "crds")},
57+
CRDDirectoryPaths: []string{
58+
filepath.Join("..", "..", "charts", "kvm-node-agent", "crds"),
59+
filepath.Join("..", "..", "hack", "crds"),
60+
},
5861
ErrorIfCRDPathMissing: true,
5962

6063
// The BinaryAssetsDirectory is only required if you want to run the tests directly

0 commit comments

Comments
 (0)