Skip to content

Commit

Permalink
Merge pull request #441 from Nordix/lentzi90/fix-api-ginkgo-tests
Browse files Browse the repository at this point in the history
🌱 Fix Ginkgo API test suite
  • Loading branch information
metal3-io-bot authored Mar 1, 2024
2 parents e5019c5 + ca0eb01 commit 916e9be
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 57 deletions.
4 changes: 2 additions & 2 deletions api/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/pkg/errors v0.9.1
k8s.io/api v0.29.2
k8s.io/apimachinery v0.29.2
k8s.io/client-go v0.29.2
k8s.io/klog/v2 v2.110.1
k8s.io/utils v0.0.0-20231127182322-b307cd553661
sigs.k8s.io/controller-runtime v0.17.2
)
Expand Down Expand Up @@ -62,8 +62,8 @@ require (
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.29.0 // indirect
k8s.io/client-go v0.29.2 // indirect
k8s.io/component-base v0.29.0 // indirect
k8s.io/klog/v2 v2.110.1 // indirect
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
Expand Down
42 changes: 42 additions & 0 deletions api/v1alpha1/suite_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
Copyright 2019 The Kubernetes Authors.
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.
*/

package v1alpha1

import (
"testing"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"k8s.io/klog/v2"

ctrl "sigs.k8s.io/controller-runtime"
logf "sigs.k8s.io/controller-runtime/pkg/log"
// +kubebuilder:scaffold:imports
)

func init() {
klog.InitFlags(nil)
klog.SetOutput(GinkgoWriter)
ctrl.SetLogger(klog.Background())
logf.SetLogger(klog.Background())
}

func TestAPI(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "API Suite")
}
55 changes: 0 additions & 55 deletions api/v1alpha1/v1alpha4_suite_test.go

This file was deleted.

0 comments on commit 916e9be

Please sign in to comment.