Skip to content

Commit

Permalink
Add new schemes to test suites
Browse files Browse the repository at this point in the history
Signed-off-by: Andrea Mazzotti <[email protected]>
  • Loading branch information
anmazzotti committed Jan 10, 2024
1 parent 4c61d89 commit d8febe0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions bootstrap/controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/envtest"

bootstrapv1beta1 "github.com/cluster-api-provider-k3s/cluster-api-k3s/bootstrap/api/v1beta1"
bootstrapv1 "github.com/cluster-api-provider-k3s/cluster-api-k3s/bootstrap/api/v1beta2"
)

// These tests use Ginkgo (BDD-style Go testing framework). Refer to
Expand Down Expand Up @@ -57,8 +58,8 @@ var _ = BeforeSuite(func(done Done) {
Expect(err).ToNot(HaveOccurred())
Expect(cfg).ToNot(BeNil())

err = bootstrapv1beta1.AddToScheme(scheme.Scheme)
Expect(err).NotTo(HaveOccurred())
Expect(bootstrapv1beta1.AddToScheme(scheme.Scheme)).Should(Succeed())
Expect(bootstrapv1.AddToScheme(scheme.Scheme)).Should(Succeed())

// +kubebuilder:scaffold:scheme

Expand Down
5 changes: 3 additions & 2 deletions controlplane/controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/envtest"

controlplanev1beta1 "github.com/cluster-api-provider-k3s/cluster-api-k3s/controlplane/api/v1beta1"
controlplanev1 "github.com/cluster-api-provider-k3s/cluster-api-k3s/controlplane/api/v1beta2"
)

// These tests use Ginkgo (BDD-style Go testing framework). Refer to
Expand Down Expand Up @@ -57,8 +58,8 @@ var _ = BeforeSuite(func(done Done) {
Expect(err).ToNot(HaveOccurred())
Expect(cfg).ToNot(BeNil())

err = controlplanev1beta1.AddToScheme(scheme.Scheme)
Expect(err).NotTo(HaveOccurred())
Expect(controlplanev1beta1.AddToScheme(scheme.Scheme)).Should(Succeed())
Expect(controlplanev1.AddToScheme(scheme.Scheme)).Should(Succeed())

// +kubebuilder:scaffold:scheme

Expand Down

0 comments on commit d8febe0

Please sign in to comment.