Skip to content

Commit f163bd4

Browse files
Fixes CI tests
1 parent 0e5c138 commit f163bd4

File tree

44 files changed

+19429
-12
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+19429
-12
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ endif
5555
PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
5656
ENVTEST = go run ${PROJECT_DIR}/vendor/sigs.k8s.io/controller-runtime/tools/setup-envtest
5757
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
58-
ENVTEST_K8S_VERSION = 1.29
58+
ENVTEST_K8S_VERSION = 1.29.1
5959

6060
.PHONY: vendor
6161
vendor:
@@ -103,7 +103,7 @@ test-sec:
103103
test: unit
104104

105105
unit:
106-
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -p path --bin-dir $(PROJECT_DIR)/bin)" ./hack/ci-test.sh
106+
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -p path --bin-dir $(PROJECT_DIR)/bin --remote-bucket openshift-kubebuilder-tools)" ./hack/ci-test.sh
107107

108108
.PHONY: image
109109
image: ## Build docker image

pkg/controller/vsphere/actuator_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func TestMachineEvents(t *testing.T) {
6262
testEnv := &envtest.Environment{
6363
CRDDirectoryPaths: []string{
6464
filepath.Join("..", "..", "..", "install"),
65-
filepath.Join("..", "..", "..", "vendor", "github.com", "openshift", "api", "config", "v1"),
65+
filepath.Join("..", "..", "..", "vendor", "github.com", "openshift", "api", "config", "v1", "zz_generated.crd-manifests"),
6666
filepath.Join("..", "..", "..", "third_party", "cluster-api", "crd")},
6767
}
6868

pkg/controller/vsphere/machine_scope_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ import (
1111

1212
. "github.com/onsi/gomega"
1313
configv1 "github.com/openshift/api/config/v1"
14+
_ "github.com/openshift/api/config/v1/zz_generated.crd-manifests"
1415
machinev1 "github.com/openshift/api/machine/v1beta1"
16+
_ "github.com/openshift/api/machine/v1beta1/zz_generated.crd-manifests"
1517
corev1 "k8s.io/api/core/v1"
1618
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1719
"k8s.io/apimachinery/pkg/runtime"
@@ -287,7 +289,7 @@ func TestPatchMachine(t *testing.T) {
287289
testEnv := &envtest.Environment{
288290
CRDDirectoryPaths: []string{
289291
filepath.Join("..", "..", "..", "install"),
290-
filepath.Join("..", "..", "..", "vendor", "github.com", "openshift", "api", "config", "v1")},
292+
filepath.Join("..", "..", "..", "vendor", "github.com", "openshift", "api", "config", "v1", "zz_generated.crd-manifests")},
291293
}
292294

293295
cfg, err := testEnv.Start()
@@ -546,7 +548,7 @@ func TestNodeGetter(t *testing.T) {
546548
testEnv := &envtest.Environment{
547549
CRDDirectoryPaths: []string{
548550
filepath.Join("..", "..", "..", "install"),
549-
filepath.Join("..", "..", "..", "vendor", "github.com", "openshift", "api", "config", "v1")},
551+
filepath.Join("..", "..", "..", "vendor", "github.com", "openshift", "api", "config", "v1", "zz_generated.crd-manifests")},
550552
}
551553

552554
cfg, err := testEnv.Start()

pkg/webhooks/machine_webhook.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ import (
44
"context"
55
"encoding/json"
66
"fmt"
7-
"regexp"
8-
goruntime "runtime"
9-
"strconv"
10-
"strings"
11-
12-
_ "github.com/openshift/api/machine/v1beta1/zz_generated.crd-manifests"
137
corev1 "k8s.io/api/core/v1"
148
apierrors "k8s.io/apimachinery/pkg/api/errors"
159
"k8s.io/apimachinery/pkg/api/resource"
@@ -22,11 +16,15 @@ import (
2216
"k8s.io/apimachinery/pkg/util/validation/field"
2317
"k8s.io/klog/v2"
2418
"k8s.io/utils/strings/slices"
19+
"regexp"
20+
goruntime "runtime"
2521
ctrl "sigs.k8s.io/controller-runtime"
2622
"sigs.k8s.io/controller-runtime/pkg/client"
2723
"sigs.k8s.io/controller-runtime/pkg/webhook/admission"
2824
"sigs.k8s.io/kube-storage-version-migrator/pkg/clients/clientset/scheme"
2925
"sigs.k8s.io/yaml"
26+
"strconv"
27+
"strings"
3028

3129
osconfigv1 "github.com/openshift/api/config/v1"
3230
machinev1 "github.com/openshift/api/machine/v1"

pkg/webhooks/v1beta1_suite_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func TestMain(m *testing.M) {
5555
testEnv = &envtest.Environment{
5656
CRDDirectoryPaths: []string{
5757
filepath.Join("..", "..", "install"),
58-
filepath.Join("..", "..", "..", "..", "vendor", "github.com", "openshift", "api", "config", "v1"),
58+
filepath.Join("..", "..", "..", "..", "vendor", "github.com", "openshift", "api", "config", "v1", "zz_generated.crd-manifests"),
5959
},
6060
WebhookInstallOptions: envtest.WebhookInstallOptions{
6161
MutatingWebhooks: []*admissionregistrationv1.MutatingWebhookConfiguration{NewMachineMutatingWebhookConfiguration()},

vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_00_cluster-version-operator_01_clusteroperators.crd.yaml

Lines changed: 167 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)