Disable metrics serving in proxy tests (#2307)

This commit is contained in:
Francesco Renzi 2023-02-22 16:57:59 +00:00 committed by GitHub
parent 9b44f0051c
commit 73e22a1756
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 10 deletions

View File

@ -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")

View File

@ -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

View File

@ -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")
}
})
})
})

View File

@ -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()))
}
})
})
})

View File

@ -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")