diff --git a/incubator/hnc/Makefile b/incubator/hnc/Makefile index 5a7d38508..39db10f39 100644 --- a/incubator/hnc/Makefile +++ b/incubator/hnc/Makefile @@ -92,7 +92,6 @@ all: test docker-build # Run tests test: build - ./hack/crd_patches/ensure-all-served-for-envtest.sh @echo @echo "If tests fail due to no matches for kind \"CustomResourceDefinition\" in version \"apiextensions.k8s.io/v1\"," @echo "please remove the old kubebuilder and reinstall it - https://book.kubebuilder.io/quick-start.html#installation" diff --git a/incubator/hnc/hack/crd_patches/ensure-all-served-for-envtest.sh b/incubator/hnc/hack/crd_patches/ensure-all-served-for-envtest.sh deleted file mode 100755 index 3f59787c4..000000000 --- a/incubator/hnc/hack/crd_patches/ensure-all-served-for-envtest.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Generate CRD manifests in manifests/envtest/. Replace "served: false" with -# "served: true" in the CRD manifests for envtest integration tests. See bug - -# https://github.com/kubernetes-sigs/multi-tenancy/issues/1148 -cp -R config/crd/bases/. manifests/envtest/ -sed -i 's/served: false/served: true/' manifests/envtest/hnc.x-k8s.io_hierarchyconfigurations.yaml -sed -i 's/served: false/served: true/' manifests/envtest/hnc.x-k8s.io_subnamespaceanchors.yaml -sed -i 's/served: false/served: true/' manifests/envtest/hnc.x-k8s.io_hncconfigurations.yaml diff --git a/incubator/hnc/internal/reconcilers/suite_test.go b/incubator/hnc/internal/reconcilers/suite_test.go index 7b14cc6c4..9a0761671 100644 --- a/incubator/hnc/internal/reconcilers/suite_test.go +++ b/incubator/hnc/internal/reconcilers/suite_test.go @@ -71,11 +71,7 @@ var _ = BeforeSuite(func(done Done) { By("bootstrapping test environment") testEnv = &envtest.Environment{ - // We set path to "../../manifests/envtest/" as a workaround for a known - // envtest bug. We should set it back to "../../config/crd/bases/" after the - // bug is fixed in controller-runtime. See issue - - // https://github.com/kubernetes-sigs/multi-tenancy/issues/1148 - CRDDirectoryPaths: []string{filepath.Join("..", "..", "manifests", "envtest")}, + CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")}, } var err error