diff --git a/controllers/actions.github.com/autoscalingrunnerset_controller_test.go b/controllers/actions.github.com/autoscalingrunnerset_controller_test.go index 4b1ac8b9..26918c9e 100644 --- a/controllers/actions.github.com/autoscalingrunnerset_controller_test.go +++ b/controllers/actions.github.com/autoscalingrunnerset_controller_test.go @@ -464,7 +464,9 @@ var _ = Describe("Test AutoscalingController creation failures", func() { err = k8sClient.Create(ctx, configSecret) Expect(err).NotTo(HaveOccurred(), "failed to create config secret") - mgr, err := ctrl.NewManager(cfg, ctrl.Options{}) + mgr, err := ctrl.NewManager(cfg, ctrl.Options{ + MetricsBindAddress: "0", + }) Expect(err).NotTo(HaveOccurred(), "failed to create manager") controller := &AutoscalingRunnerSetReconciler{ @@ -610,7 +612,8 @@ var _ = Describe("Test Client optional configuration", func() { Expect(err).NotTo(HaveOccurred(), "failed to create config secret") mgr, err = ctrl.NewManager(cfg, ctrl.Options{ - Namespace: autoscalingNS.Name, + Namespace: autoscalingNS.Name, + MetricsBindAddress: "0", }) Expect(err).NotTo(HaveOccurred(), "failed to create manager") diff --git a/controllers/actions.github.com/ephemeralrunnerset_controller_test.go b/controllers/actions.github.com/ephemeralrunnerset_controller_test.go index cba4eb2d..571492b9 100644 --- a/controllers/actions.github.com/ephemeralrunnerset_controller_test.go +++ b/controllers/actions.github.com/ephemeralrunnerset_controller_test.go @@ -458,7 +458,7 @@ var _ = Describe("Test EphemeralRunnerSet controller", func() { runningRunner = runnerList.Items[1].DeepCopy() runningRunner.Status.JobRequestId = 1001 - err = k8sClient.Status().Patch(ctx, runningRunner, client.MergeFrom(&runnerList.Items[0])) + err = k8sClient.Status().Patch(ctx, runningRunner, client.MergeFrom(&runnerList.Items[1])) Expect(err).NotTo(HaveOccurred(), "failed to update EphemeralRunner") // Scale down to 1 diff --git a/controllers/actions.summerwind.net/integration_test.go b/controllers/actions.summerwind.net/integration_test.go index d5d967d1..d10184eb 100644 --- a/controllers/actions.summerwind.net/integration_test.go +++ b/controllers/actions.summerwind.net/integration_test.go @@ -69,7 +69,8 @@ func SetupIntegrationTest(ctx2 context.Context) *testEnvironment { Expect(err).NotTo(HaveOccurred(), "failed to create test namespace") mgr, err := ctrl.NewManager(cfg, ctrl.Options{ - Namespace: ns.Name, + Namespace: ns.Name, + MetricsBindAddress: "0", }) Expect(err).NotTo(HaveOccurred(), "failed to create manager") @@ -188,7 +189,6 @@ var _ = Context("INTEGRATION: Inside of a new namespace", func() { ns := env.Namespace Describe("when no existing resources exist", func() { - It("should create and scale organization's repository runners on workflow_job event", func() { name := "example-runnerdeploy" @@ -455,7 +455,6 @@ var _ = Context("INTEGRATION: Inside of a new namespace", func() { env.ExpectRegisteredNumberCountEventuallyEquals(2, "count of fake list runners") } }) - }) }) diff --git a/controllers/actions.summerwind.net/runnerdeployment_controller_test.go b/controllers/actions.summerwind.net/runnerdeployment_controller_test.go index 5fe06566..220ac626 100644 --- a/controllers/actions.summerwind.net/runnerdeployment_controller_test.go +++ b/controllers/actions.summerwind.net/runnerdeployment_controller_test.go @@ -143,7 +143,8 @@ func SetupDeploymentTest(ctx2 context.Context) *corev1.Namespace { Expect(err).NotTo(HaveOccurred(), "failed to create test namespace") mgr, err := ctrl.NewManager(cfg, ctrl.Options{ - Namespace: ns.Name, + Namespace: ns.Name, + MetricsBindAddress: "0", }) Expect(err).NotTo(HaveOccurred(), "failed to create manager") @@ -180,7 +181,6 @@ var _ = Context("Inside of a new namespace", func() { ns := SetupDeploymentTest(ctx) Describe("when no existing resources exist", func() { - It("should create a new RunnerReplicaSet resource from the specified template, add a another RunnerReplicaSet on template modification, and eventually removes old runnerreplicasets", func() { name := "example-runnerdeploy-1" @@ -491,6 +491,5 @@ var _ = Context("Inside of a new namespace", func() { time.Second*1, time.Millisecond*500).Should(Not(BeNil())) } }) - }) }) diff --git a/controllers/actions.summerwind.net/runnerreplicaset_controller_test.go b/controllers/actions.summerwind.net/runnerreplicaset_controller_test.go index f018a456..cba3c9d5 100644 --- a/controllers/actions.summerwind.net/runnerreplicaset_controller_test.go +++ b/controllers/actions.summerwind.net/runnerreplicaset_controller_test.go @@ -46,7 +46,8 @@ func SetupTest(ctx2 context.Context) *corev1.Namespace { Expect(err).NotTo(HaveOccurred(), "failed to create test namespace") mgr, err := ctrl.NewManager(cfg, ctrl.Options{ - Namespace: ns.Name, + Namespace: ns.Name, + MetricsBindAddress: "0", }) Expect(err).NotTo(HaveOccurred(), "failed to create manager")