Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
afritzler committed Jan 27, 2025
1 parent d1ba01d commit 70f4cb1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest
## Tool Versions

# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.32.0
ENVTEST_K8S_VERSION = 1.31.0

.PHONY: envtest
envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
Expand Down
12 changes: 4 additions & 8 deletions pkg/admission/validator/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@
package validator

import (
extensionspredicate "github.com/gardener/gardener/extensions/pkg/predicate"
extensionswebhook "github.com/gardener/gardener/extensions/pkg/webhook"
"github.com/gardener/gardener/pkg/apis/core"
"github.com/ironcore-dev/gardener-extension-provider-ironcore-metal/pkg/metal"
corev1 "k8s.io/api/core/v1"
"sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/manager"
"sigs.k8s.io/controller-runtime/pkg/predicate"

"github.com/ironcore-dev/gardener-extension-provider-ironcore-metal/pkg/metal"
)

const (
Expand All @@ -29,10 +26,9 @@ func New(mgr manager.Manager) (*extensionswebhook.Webhook, error) {
logger.Info("Setting up webhook", "name", Name)

return extensionswebhook.New(mgr, extensionswebhook.Args{
Provider: metal.Type,
Name: Name,
Path: "/webhooks/validate",
Predicates: []predicate.Predicate{extensionspredicate.GardenCoreProviderType(metal.Type)},
Provider: metal.Type,
Name: Name,
Path: "/webhooks/validate",
Validators: map[extensionswebhook.Validator][]extensionswebhook.Type{
NewShootValidator(mgr): {{Obj: &core.Shoot{}}},
NewSecretBindingValidator(mgr): {{Obj: &core.SecretBinding{}}},
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/controlplane/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ var _ = BeforeSuite(func() {
// Note that you must have the required binaries setup under the bin directory to perform
// the tests directly. When we run make test it will be setup and used automatically.
BinaryAssetsDirectory: filepath.Join("..", "..", "..", "bin", "k8s",
fmt.Sprintf("1.32.0-%s-%s", runtime.GOOS, runtime.GOARCH)),
fmt.Sprintf("1.31.0-%s-%s", runtime.GOOS, runtime.GOARCH)),
}

var err error
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/worker/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ var _ = BeforeSuite(func() {
// Note that you must have the required binaries setup under the bin directory to perform
// the tests directly. When we run make test it will be setup and used automatically.
BinaryAssetsDirectory: filepath.Join("..", "..", "..", "bin", "k8s",
fmt.Sprintf("1.32.0-%s-%s", runtime.GOOS, runtime.GOARCH)),
fmt.Sprintf("1.31.0-%s-%s", runtime.GOOS, runtime.GOARCH)),
}

var err error
Expand Down

0 comments on commit 70f4cb1

Please sign in to comment.