Skip to content

Commit

Permalink
Merge pull request #877 from RedHatInsights/psav/fix_dot_import
Browse files Browse the repository at this point in the history
Fix dot import and update images
  • Loading branch information
bsquizz authored Oct 23, 2023
2 parents 93e26ee + 8d7e362 commit 6cc1222
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RUN CGO_ENABLED=1 GOOS=linux GO111MODULE=on go build -o manager main.go

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.8-1072.1696517598
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.8-1072.1697626218
WORKDIR /
COPY --from=builder /workspace/manager .
COPY --from=builder /workspace/manifest.yaml .
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.base
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM registry.access.redhat.com/ubi8/go-toolset:1.19.10-16.1696540524 as builder
FROM registry.access.redhat.com/ubi8/go-toolset:1.19.13-2.1697656138 as builder
USER 0
RUN dnf install -y openssh-clients git make which jq python3

Expand Down
28 changes: 14 additions & 14 deletions apis/cloud.redhat.com/v1alpha1/webhook_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"time"

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

admissionv1beta1 "k8s.io/api/admission/v1beta1"
//+kubebuilder:scaffold:imports
Expand All @@ -47,7 +47,7 @@ var ctx context.Context
var cancel context.CancelFunc

func TestAPIs(t *testing.T) {
RegisterFailHandler(ginkgo.Fail)
g.RegisterFailHandler(ginkgo.Fail)

ginkgo.RunSpecs(t,
"Webhook Suite",
Expand All @@ -69,21 +69,21 @@ var _ = ginkgo.BeforeSuite(func() {
}

cfg, err := testEnv.Start()
Expect(err).NotTo(HaveOccurred())
Expect(cfg).NotTo(BeNil())
g.Expect(err).NotTo(g.HaveOccurred())
g.Expect(cfg).NotTo(g.BeNil())

scheme := runtime.NewScheme()
err = AddToScheme(scheme)
Expect(err).NotTo(HaveOccurred())
g.Expect(err).NotTo(g.HaveOccurred())

err = admissionv1beta1.AddToScheme(scheme)
Expect(err).NotTo(HaveOccurred())
g.Expect(err).NotTo(g.HaveOccurred())

//+kubebuilder:scaffold:scheme

k8sClient, err = client.New(cfg, client.Options{Scheme: scheme})
Expect(err).NotTo(HaveOccurred())
Expect(k8sClient).NotTo(BeNil())
g.Expect(err).NotTo(g.HaveOccurred())
g.Expect(k8sClient).NotTo(g.BeNil())

// start webhook server using Manager
webhookInstallOptions := &testEnv.WebhookInstallOptions
Expand All @@ -95,37 +95,37 @@ var _ = ginkgo.BeforeSuite(func() {
LeaderElection: false,
MetricsBindAddress: "0",
})
Expect(err).NotTo(HaveOccurred())
g.Expect(err).NotTo(g.HaveOccurred())

err = (&ClowdApp{}).SetupWebhookWithManager(mgr)
Expect(err).NotTo(HaveOccurred())
g.Expect(err).NotTo(g.HaveOccurred())

//+kubebuilder:scaffold:webhook

go func() {
err = mgr.Start(ctx)
if err != nil {
Expect(err).NotTo(HaveOccurred())
g.Expect(err).NotTo(g.HaveOccurred())
}
}()

// wait for the webhook server to get ready
dialer := &net.Dialer{Timeout: time.Second}
addrPort := fmt.Sprintf("%s:%d", webhookInstallOptions.LocalServingHost, webhookInstallOptions.LocalServingPort)
Eventually(func() error {
g.Eventually(func() error {
conn, err := tls.DialWithDialer(dialer, "tcp", addrPort, &tls.Config{InsecureSkipVerify: true}) //nolint:gosec
if err != nil {
return err
}
conn.Close()
return nil
}).Should(Succeed())
}).Should(g.Succeed())

})

var _ = ginkgo.AfterSuite(func() {
cancel()
ginkgo.By("tearing down the test environment")
err := testEnv.Stop()
Expect(err).NotTo(HaveOccurred())
g.Expect(err).NotTo(g.HaveOccurred())
})

0 comments on commit 6cc1222

Please sign in to comment.