@@ -20,8 +20,8 @@ import (
2020 "path/filepath"
2121 "testing"
2222
23- "github.com/onsi/ginkgo/v2"
24- "github.com/onsi/gomega"
23+ ginkgo "github.com/onsi/ginkgo/v2"
24+ gomega "github.com/onsi/gomega"
2525 "k8s.io/client-go/kubernetes/scheme"
2626 "sigs.k8s.io/controller-runtime/pkg/client"
2727 "sigs.k8s.io/controller-runtime/pkg/envtest"
@@ -42,38 +42,38 @@ var (
4242
4343func TestAPIs (t * testing.T ) {
4444 t .Parallel ()
45- RegisterFailHandler (Fail )
45+ gomega . RegisterFailHandler (ginkgo . Fail )
4646
47- RunSpecs (t , "Controller Suite" )
47+ ginkgo . RunSpecs (t , "Controller Suite" )
4848}
4949
50- var _ = BeforeSuite (func () {
51- logf .SetLogger (zap .New (zap .WriteTo (GinkgoWriter ), zap .UseDevMode (true )))
50+ var _ = ginkgo . BeforeSuite (func () {
51+ logf .SetLogger (zap .New (zap .WriteTo (ginkgo . GinkgoWriter ), zap .UseDevMode (true )))
5252
53- By ("bootstrapping test environment" )
53+ ginkgo . By ("bootstrapping test environment" )
5454 testEnv = & envtest.Environment {
5555 CRDDirectoryPaths : []string {filepath .Join (".." , "config" , "crd" , "bases" )},
5656 }
5757
5858 cfg , err := testEnv .Start ()
59- Expect (err ).NotTo (HaveOccurred ())
60- Expect (cfg ).NotTo (BeNil ())
59+ gomega . Expect (err ).NotTo (gomega . HaveOccurred ())
60+ gomega . Expect (cfg ).NotTo (gomega . BeNil ())
6161
6262 err = replicationv1alpha1 .AddToScheme (scheme .Scheme )
63- Expect (err ).NotTo (HaveOccurred ())
63+ gomega . Expect (err ).NotTo (gomega . HaveOccurred ())
6464
6565 err = replicationv1alpha1 .AddToScheme (scheme .Scheme )
66- Expect (err ).NotTo (HaveOccurred ())
66+ gomega . Expect (err ).NotTo (gomega . HaveOccurred ())
6767
6868 // +kubebuilder:scaffold:scheme
6969
7070 k8sClient , err = client .New (cfg , client.Options {Scheme : scheme .Scheme })
71- Expect (err ).NotTo (HaveOccurred ())
72- Expect (k8sClient ).NotTo (BeNil ())
71+ gomega . Expect (err ).NotTo (gomega . HaveOccurred ())
72+ gomega . Expect (k8sClient ).NotTo (gomega . BeNil ())
7373})
7474
75- var _ = AfterSuite (func () {
76- By ("tearing down the test environment" )
75+ var _ = ginkgo . AfterSuite (func () {
76+ ginkgo . By ("tearing down the test environment" )
7777 err := testEnv .Stop ()
78- Expect (err ).NotTo (HaveOccurred ())
78+ gomega . Expect (err ).NotTo (gomega . HaveOccurred ())
7979})
0 commit comments