Skip to content

Commit 543b4a1

Browse files
authored
Merge pull request #4529 from anshuman-agarwala/e2e-cleanup
🐛 (go/v4): e2e test: Removed Prometheus dependency
2 parents d908e83 + b13dbb5 commit 543b4a1

File tree

24 files changed

+164
-245
lines changed

24 files changed

+164
-245
lines changed

docs/book/src/cronjob-tutorial/testdata/project/Makefile

+1-2
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ test: manifests generate fmt vet setup-envtest ## Run tests.
6767

6868
# TODO(user): To use a different vendor for e2e tests, modify the setup under 'tests/e2e'.
6969
# The default setup assumes Kind is pre-installed and builds/loads the Manager Docker image locally.
70-
# Prometheus and CertManager are installed by default; skip with:
71-
# - PROMETHEUS_INSTALL_SKIP=true
70+
# CertManager is installed by default; skip with:
7271
# - CERT_MANAGER_INSTALL_SKIP=true
7372
.PHONY: test-e2e
7473
test-e2e: manifests generate fmt vet ## Run the e2e tests. Expected an isolated environment using Kind.

docs/book/src/cronjob-tutorial/testdata/project/test/e2e/e2e_suite_test.go

+22-20
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,14 @@ import (
3030

3131
var (
3232
// Optional Environment Variables:
33-
// - PROMETHEUS_INSTALL_SKIP=true: Skips Prometheus Operator installation during test setup.
3433
// - CERT_MANAGER_INSTALL_SKIP=true: Skips CertManager installation during test setup.
35-
// These variables are useful if Prometheus or CertManager is already installed, avoiding
34+
// These variables are useful if CertManager is already installed, avoiding
3635
// re-installation and conflicts.
37-
skipPrometheusInstall = os.Getenv("PROMETHEUS_INSTALL_SKIP") == "true"
3836
skipCertManagerInstall = os.Getenv("CERT_MANAGER_INSTALL_SKIP") == "true"
39-
// isPrometheusOperatorAlreadyInstalled will be set true when prometheus CRDs be found on the cluster
40-
isPrometheusOperatorAlreadyInstalled = false
4137
// isCertManagerAlreadyInstalled will be set true when CertManager CRDs be found on the cluster
4238
isCertManagerAlreadyInstalled = false
39+
// isPrometheusOperatorAlreadyInstalled will be set true when prometheus CRDs be found on the cluster
40+
isPrometheusOperatorAlreadyInstalled = false
4341

4442
// projectImage is the name of the image which will be build and loaded
4543
// with the code source changes to be tested.
@@ -49,7 +47,7 @@ var (
4947
// TestE2E runs the end-to-end (e2e) test suite for the project. These tests execute in an isolated,
5048
// temporary environment to validate project changes with the the purposed to be used in CI jobs.
5149
// The default setup requires Kind, builds/loads the Manager Docker image locally, and installs
52-
// CertManager and Prometheus.
50+
// CertManager.
5351
func TestE2E(t *testing.T) {
5452
RegisterFailHandler(Fail)
5553
_, _ = fmt.Fprintf(GinkgoWriter, "Starting project integration test suite\n")
@@ -72,19 +70,21 @@ var _ = BeforeSuite(func() {
7270
ExpectWithOffset(1, err).NotTo(HaveOccurred(), "Failed to load the manager(Operator) image into Kind")
7371

7472
// The tests-e2e are intended to run on a temporary cluster that is created and destroyed for testing.
75-
// To prevent errors when tests run in environments with Prometheus or CertManager already installed,
76-
// we check for their presence before execution.
77-
// Setup Prometheus and CertManager before the suite if not skipped and if not already installed
78-
if !skipPrometheusInstall {
79-
By("checking if prometheus is installed already")
80-
isPrometheusOperatorAlreadyInstalled = utils.IsPrometheusCRDsInstalled()
81-
if !isPrometheusOperatorAlreadyInstalled {
82-
_, _ = fmt.Fprintf(GinkgoWriter, "Installing Prometheus Operator...\n")
83-
Expect(utils.InstallPrometheusOperator()).To(Succeed(), "Failed to install Prometheus Operator")
84-
} else {
85-
_, _ = fmt.Fprintf(GinkgoWriter, "WARNING: Prometheus Operator is already installed. Skipping installation...\n")
86-
}
73+
// To prevent errors when tests run in environments with Prometheus already installed,
74+
// we check for it's presence before execution.
75+
// Setup Prometheus before the suite if not already installed
76+
By("checking if prometheus is installed already")
77+
isPrometheusOperatorAlreadyInstalled = utils.IsPrometheusCRDsInstalled()
78+
if !isPrometheusOperatorAlreadyInstalled {
79+
_, _ = fmt.Fprintf(GinkgoWriter, "Installing Prometheus Operator...\n")
80+
Expect(utils.InstallPrometheusOperator()).To(Succeed(), "Failed to install Prometheus Operator")
81+
} else {
82+
_, _ = fmt.Fprintf(GinkgoWriter, "WARNING: Prometheus Operator is already installed. Skipping installation...\n")
8783
}
84+
85+
// To prevent errors when tests run in environments with CertManager already installed,
86+
// we check for its presence before execution.
87+
// Setup CertManager before the suite if not skipped and if not already installed
8888
if !skipCertManagerInstall {
8989
By("checking if cert manager is installed already")
9090
isCertManagerAlreadyInstalled = utils.IsCertManagerCRDsInstalled()
@@ -98,11 +98,13 @@ var _ = BeforeSuite(func() {
9898
})
9999

100100
var _ = AfterSuite(func() {
101-
// Teardown Prometheus and CertManager after the suite if not skipped and if they were not already installed
102-
if !skipPrometheusInstall && !isPrometheusOperatorAlreadyInstalled {
101+
// Teardown Prometheus after the suite if it was not already installed
102+
if !isPrometheusOperatorAlreadyInstalled {
103103
_, _ = fmt.Fprintf(GinkgoWriter, "Uninstalling Prometheus Operator...\n")
104104
utils.UninstallPrometheusOperator()
105105
}
106+
107+
// Teardown CertManager after the suite if not skipped and if it was not already installed
106108
if !skipCertManagerInstall && !isCertManagerAlreadyInstalled {
107109
_, _ = fmt.Fprintf(GinkgoWriter, "Uninstalling CertManager...\n")
108110
utils.UninstallCertManager()

docs/book/src/getting-started/testdata/project/Makefile

+1-2
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ test: manifests generate fmt vet setup-envtest ## Run tests.
6363

6464
# TODO(user): To use a different vendor for e2e tests, modify the setup under 'tests/e2e'.
6565
# The default setup assumes Kind is pre-installed and builds/loads the Manager Docker image locally.
66-
# Prometheus and CertManager are installed by default; skip with:
67-
# - PROMETHEUS_INSTALL_SKIP=true
66+
# CertManager is installed by default; skip with:
6867
# - CERT_MANAGER_INSTALL_SKIP=true
6968
.PHONY: test-e2e
7069
test-e2e: manifests generate fmt vet ## Run the e2e tests. Expected an isolated environment using Kind.

docs/book/src/getting-started/testdata/project/config/default/kustomization.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ resources:
2424
# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER'. 'WEBHOOK' components are required.
2525
#- ../certmanager
2626
# [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'.
27-
- ../prometheus
27+
#- ../prometheus
2828
# [METRICS] Expose the controller manager metrics service.
2929
- metrics_service.yaml
3030
# [NETWORK POLICY] Protect the /metrics endpoint and Webhook Server with NetworkPolicy.

docs/book/src/getting-started/testdata/project/dist/install.yaml

-22
Original file line numberDiff line numberDiff line change
@@ -461,25 +461,3 @@ spec:
461461
serviceAccountName: project-controller-manager
462462
terminationGracePeriodSeconds: 10
463463
volumes: []
464-
---
465-
apiVersion: monitoring.coreos.com/v1
466-
kind: ServiceMonitor
467-
metadata:
468-
labels:
469-
app.kubernetes.io/managed-by: kustomize
470-
app.kubernetes.io/name: project
471-
control-plane: controller-manager
472-
name: project-controller-manager-metrics-monitor
473-
namespace: project-system
474-
spec:
475-
endpoints:
476-
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
477-
path: /metrics
478-
port: https
479-
scheme: https
480-
tlsConfig:
481-
insecureSkipVerify: true
482-
selector:
483-
matchLabels:
484-
app.kubernetes.io/name: project
485-
control-plane: controller-manager

docs/book/src/getting-started/testdata/project/test/e2e/e2e_suite_test.go

+6-27
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,10 @@ import (
3030

3131
var (
3232
// Optional Environment Variables:
33-
// - PROMETHEUS_INSTALL_SKIP=true: Skips Prometheus Operator installation during test setup.
3433
// - CERT_MANAGER_INSTALL_SKIP=true: Skips CertManager installation during test setup.
35-
// These variables are useful if Prometheus or CertManager is already installed, avoiding
34+
// These variables are useful if CertManager is already installed, avoiding
3635
// re-installation and conflicts.
37-
skipPrometheusInstall = os.Getenv("PROMETHEUS_INSTALL_SKIP") == "true"
3836
skipCertManagerInstall = os.Getenv("CERT_MANAGER_INSTALL_SKIP") == "true"
39-
// isPrometheusOperatorAlreadyInstalled will be set true when prometheus CRDs be found on the cluster
40-
isPrometheusOperatorAlreadyInstalled = false
4137
// isCertManagerAlreadyInstalled will be set true when CertManager CRDs be found on the cluster
4238
isCertManagerAlreadyInstalled = false
4339

@@ -49,17 +45,14 @@ var (
4945
// TestE2E runs the end-to-end (e2e) test suite for the project. These tests execute in an isolated,
5046
// temporary environment to validate project changes with the the purposed to be used in CI jobs.
5147
// The default setup requires Kind, builds/loads the Manager Docker image locally, and installs
52-
// CertManager and Prometheus.
48+
// CertManager.
5349
func TestE2E(t *testing.T) {
5450
RegisterFailHandler(Fail)
5551
_, _ = fmt.Fprintf(GinkgoWriter, "Starting project integration test suite\n")
5652
RunSpecs(t, "e2e suite")
5753
}
5854

5955
var _ = BeforeSuite(func() {
60-
By("Ensure that Prometheus is enabled")
61-
_ = utils.UncommentCode("config/default/kustomization.yaml", "#- ../prometheus", "#")
62-
6356
By("building the manager(Operator) image")
6457
cmd := exec.Command("make", "docker-build", fmt.Sprintf("IMG=%s", projectImage))
6558
_, err := utils.Run(cmd)
@@ -72,19 +65,9 @@ var _ = BeforeSuite(func() {
7265
ExpectWithOffset(1, err).NotTo(HaveOccurred(), "Failed to load the manager(Operator) image into Kind")
7366

7467
// The tests-e2e are intended to run on a temporary cluster that is created and destroyed for testing.
75-
// To prevent errors when tests run in environments with Prometheus or CertManager already installed,
76-
// we check for their presence before execution.
77-
// Setup Prometheus and CertManager before the suite if not skipped and if not already installed
78-
if !skipPrometheusInstall {
79-
By("checking if prometheus is installed already")
80-
isPrometheusOperatorAlreadyInstalled = utils.IsPrometheusCRDsInstalled()
81-
if !isPrometheusOperatorAlreadyInstalled {
82-
_, _ = fmt.Fprintf(GinkgoWriter, "Installing Prometheus Operator...\n")
83-
Expect(utils.InstallPrometheusOperator()).To(Succeed(), "Failed to install Prometheus Operator")
84-
} else {
85-
_, _ = fmt.Fprintf(GinkgoWriter, "WARNING: Prometheus Operator is already installed. Skipping installation...\n")
86-
}
87-
}
68+
// To prevent errors when tests run in environments with CertManager already installed,
69+
// we check for its presence before execution.
70+
// Setup CertManager before the suite if not skipped and if not already installed
8871
if !skipCertManagerInstall {
8972
By("checking if cert manager is installed already")
9073
isCertManagerAlreadyInstalled = utils.IsCertManagerCRDsInstalled()
@@ -98,11 +81,7 @@ var _ = BeforeSuite(func() {
9881
})
9982

10083
var _ = AfterSuite(func() {
101-
// Teardown Prometheus and CertManager after the suite if not skipped and if they were not already installed
102-
if !skipPrometheusInstall && !isPrometheusOperatorAlreadyInstalled {
103-
_, _ = fmt.Fprintf(GinkgoWriter, "Uninstalling Prometheus Operator...\n")
104-
utils.UninstallPrometheusOperator()
105-
}
84+
// Teardown CertManager after the suite if not skipped and if it was not already installed
10685
if !skipCertManagerInstall && !isCertManagerAlreadyInstalled {
10786
_, _ = fmt.Fprintf(GinkgoWriter, "Uninstalling CertManager...\n")
10887
utils.UninstallCertManager()

docs/book/src/getting-started/testdata/project/test/e2e/e2e_test.go

-5
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,6 @@ var _ = Describe("Manager", Ordered, func() {
184184
_, err = utils.Run(cmd)
185185
Expect(err).NotTo(HaveOccurred(), "Metrics service should exist")
186186

187-
By("validating that the ServiceMonitor for Prometheus is applied in the namespace")
188-
cmd = exec.Command("kubectl", "get", "ServiceMonitor", "-n", namespace)
189-
_, err = utils.Run(cmd)
190-
Expect(err).NotTo(HaveOccurred(), "ServiceMonitor should exist")
191-
192187
By("getting the service account token")
193188
token, err := serviceAccountToken()
194189
Expect(err).NotTo(HaveOccurred())

docs/book/src/multiversion-tutorial/testdata/project/Makefile

+1-2
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ test: manifests generate fmt vet setup-envtest ## Run tests.
6767

6868
# TODO(user): To use a different vendor for e2e tests, modify the setup under 'tests/e2e'.
6969
# The default setup assumes Kind is pre-installed and builds/loads the Manager Docker image locally.
70-
# Prometheus and CertManager are installed by default; skip with:
71-
# - PROMETHEUS_INSTALL_SKIP=true
70+
# CertManager is installed by default; skip with:
7271
# - CERT_MANAGER_INSTALL_SKIP=true
7372
.PHONY: test-e2e
7473
test-e2e: manifests generate fmt vet ## Run the e2e tests. Expected an isolated environment using Kind.

docs/book/src/multiversion-tutorial/testdata/project/test/e2e/e2e_suite_test.go

+22-20
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,14 @@ import (
3030

3131
var (
3232
// Optional Environment Variables:
33-
// - PROMETHEUS_INSTALL_SKIP=true: Skips Prometheus Operator installation during test setup.
3433
// - CERT_MANAGER_INSTALL_SKIP=true: Skips CertManager installation during test setup.
35-
// These variables are useful if Prometheus or CertManager is already installed, avoiding
34+
// These variables are useful if CertManager is already installed, avoiding
3635
// re-installation and conflicts.
37-
skipPrometheusInstall = os.Getenv("PROMETHEUS_INSTALL_SKIP") == "true"
3836
skipCertManagerInstall = os.Getenv("CERT_MANAGER_INSTALL_SKIP") == "true"
39-
// isPrometheusOperatorAlreadyInstalled will be set true when prometheus CRDs be found on the cluster
40-
isPrometheusOperatorAlreadyInstalled = false
4137
// isCertManagerAlreadyInstalled will be set true when CertManager CRDs be found on the cluster
4238
isCertManagerAlreadyInstalled = false
39+
// isPrometheusOperatorAlreadyInstalled will be set true when prometheus CRDs be found on the cluster
40+
isPrometheusOperatorAlreadyInstalled = false
4341

4442
// projectImage is the name of the image which will be build and loaded
4543
// with the code source changes to be tested.
@@ -49,7 +47,7 @@ var (
4947
// TestE2E runs the end-to-end (e2e) test suite for the project. These tests execute in an isolated,
5048
// temporary environment to validate project changes with the the purposed to be used in CI jobs.
5149
// The default setup requires Kind, builds/loads the Manager Docker image locally, and installs
52-
// CertManager and Prometheus.
50+
// CertManager.
5351
func TestE2E(t *testing.T) {
5452
RegisterFailHandler(Fail)
5553
_, _ = fmt.Fprintf(GinkgoWriter, "Starting project integration test suite\n")
@@ -72,19 +70,21 @@ var _ = BeforeSuite(func() {
7270
ExpectWithOffset(1, err).NotTo(HaveOccurred(), "Failed to load the manager(Operator) image into Kind")
7371

7472
// The tests-e2e are intended to run on a temporary cluster that is created and destroyed for testing.
75-
// To prevent errors when tests run in environments with Prometheus or CertManager already installed,
76-
// we check for their presence before execution.
77-
// Setup Prometheus and CertManager before the suite if not skipped and if not already installed
78-
if !skipPrometheusInstall {
79-
By("checking if prometheus is installed already")
80-
isPrometheusOperatorAlreadyInstalled = utils.IsPrometheusCRDsInstalled()
81-
if !isPrometheusOperatorAlreadyInstalled {
82-
_, _ = fmt.Fprintf(GinkgoWriter, "Installing Prometheus Operator...\n")
83-
Expect(utils.InstallPrometheusOperator()).To(Succeed(), "Failed to install Prometheus Operator")
84-
} else {
85-
_, _ = fmt.Fprintf(GinkgoWriter, "WARNING: Prometheus Operator is already installed. Skipping installation...\n")
86-
}
73+
// To prevent errors when tests run in environments with Prometheus already installed,
74+
// we check for it's presence before execution.
75+
// Setup Prometheus before the suite if not already installed
76+
By("checking if prometheus is installed already")
77+
isPrometheusOperatorAlreadyInstalled = utils.IsPrometheusCRDsInstalled()
78+
if !isPrometheusOperatorAlreadyInstalled {
79+
_, _ = fmt.Fprintf(GinkgoWriter, "Installing Prometheus Operator...\n")
80+
Expect(utils.InstallPrometheusOperator()).To(Succeed(), "Failed to install Prometheus Operator")
81+
} else {
82+
_, _ = fmt.Fprintf(GinkgoWriter, "WARNING: Prometheus Operator is already installed. Skipping installation...\n")
8783
}
84+
85+
// To prevent errors when tests run in environments with CertManager already installed,
86+
// we check for its presence before execution.
87+
// Setup CertManager before the suite if not skipped and if not already installed
8888
if !skipCertManagerInstall {
8989
By("checking if cert manager is installed already")
9090
isCertManagerAlreadyInstalled = utils.IsCertManagerCRDsInstalled()
@@ -98,11 +98,13 @@ var _ = BeforeSuite(func() {
9898
})
9999

100100
var _ = AfterSuite(func() {
101-
// Teardown Prometheus and CertManager after the suite if not skipped and if they were not already installed
102-
if !skipPrometheusInstall && !isPrometheusOperatorAlreadyInstalled {
101+
// Teardown Prometheus after the suite if it was not already installed
102+
if !isPrometheusOperatorAlreadyInstalled {
103103
_, _ = fmt.Fprintf(GinkgoWriter, "Uninstalling Prometheus Operator...\n")
104104
utils.UninstallPrometheusOperator()
105105
}
106+
107+
// Teardown CertManager after the suite if not skipped and if it was not already installed
106108
if !skipCertManagerInstall && !isCertManagerAlreadyInstalled {
107109
_, _ = fmt.Fprintf(GinkgoWriter, "Uninstalling CertManager...\n")
108110
utils.UninstallCertManager()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/*
2+
Copyright 2025 The Kubernetes Authors.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
package cronjob
18+
19+
const isPrometheusInstalledVar = `
20+
// isPrometheusOperatorAlreadyInstalled will be set true when prometheus CRDs be found on the cluster
21+
isPrometheusOperatorAlreadyInstalled = false
22+
`
23+
24+
const beforeSuitePrometheus = `
25+
By("Ensure that Prometheus is enabled")
26+
_ = utils.UncommentCode("config/default/kustomization.yaml", "#- ../prometheus", "#")
27+
`
28+
29+
const afterSuitePrometheus = `
30+
// Teardown Prometheus after the suite if it was not already installed
31+
if !isPrometheusOperatorAlreadyInstalled {
32+
_, _ = fmt.Fprintf(GinkgoWriter, "Uninstalling Prometheus Operator...\n")
33+
utils.UninstallPrometheusOperator()
34+
}
35+
`
36+
37+
const checkPrometheusInstalled = `
38+
// To prevent errors when tests run in environments with Prometheus already installed,
39+
// we check for it's presence before execution.
40+
// Setup Prometheus before the suite if not already installed
41+
By("checking if prometheus is installed already")
42+
isPrometheusOperatorAlreadyInstalled = utils.IsPrometheusCRDsInstalled()
43+
if !isPrometheusOperatorAlreadyInstalled {
44+
_, _ = fmt.Fprintf(GinkgoWriter, "Installing Prometheus Operator...\n")
45+
Expect(utils.InstallPrometheusOperator()).To(Succeed(), "Failed to install Prometheus Operator")
46+
} else {
47+
_, _ = fmt.Fprintf(GinkgoWriter, "WARNING: Prometheus Operator is already installed. Skipping installation...\n")
48+
}
49+
`
50+
const serviceMonitorE2e = `
51+
52+
By("validating that the ServiceMonitor for Prometheus is applied in the namespace")
53+
cmd = exec.Command("kubectl", "get", "ServiceMonitor", "-n", namespace)
54+
_, err = utils.Run(cmd)
55+
Expect(err).NotTo(HaveOccurred(), "ServiceMonitor should exist")
56+
57+
`

hack/docs/internal/cronjob-tutorial/generate_cronjob.go

+25
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ func (sp *Sample) UpdateTutorial() {
124124
sp.updateExample()
125125
// 12. add test
126126
sp.addControllerTest()
127+
// 13. update e2e tests
128+
sp.updateE2E()
127129
}
128130

129131
// CodeGen is a noop for this sample, just to make generation of all samples
@@ -646,3 +648,26 @@ func (sp *Sample) addControllerTest() {
646648
err := afero.WriteFile(fs, filepath.Join(sp.ctx.Dir, "internal/controller/cronjob_controller_test.go"), []byte(controllerTest), 0600)
647649
hackutils.CheckError("adding cronjob_controller_test", err)
648650
}
651+
652+
func (sp *Sample) updateE2E() {
653+
cronjobE2ESuite := filepath.Join(sp.ctx.Dir, "test", "e2e", "e2e_suite_test.go")
654+
cronjobE2ETest := filepath.Join(sp.ctx.Dir, "test", "e2e", "e2e_test.go")
655+
var err error
656+
657+
err = pluginutil.InsertCode(cronjobE2ESuite, `isCertManagerAlreadyInstalled = false`, isPrometheusInstalledVar)
658+
hackutils.CheckError("fixing test/e2e/e2e_suite_test.go", err)
659+
660+
err = pluginutil.InsertCode(cronjobE2ESuite, `var _ = BeforeSuite(func() {`, beforeSuitePrometheus)
661+
hackutils.CheckError("fixing test/e2e/e2e_suite_test.go", err)
662+
663+
err = pluginutil.InsertCode(cronjobE2ESuite,
664+
`// The tests-e2e are intended to run on a temporary cluster that is created and destroyed for testing.`,
665+
checkPrometheusInstalled)
666+
hackutils.CheckError("fixing test/e2e/e2e_suite_test.go", err)
667+
668+
err = pluginutil.InsertCode(cronjobE2ESuite, `var _ = AfterSuite(func() {`, afterSuitePrometheus)
669+
hackutils.CheckError("fixing test/e2e/e2e_suite_test.go", err)
670+
671+
err = pluginutil.InsertCode(cronjobE2ETest, `Expect(err).NotTo(HaveOccurred(), "Metrics service should exist")`, serviceMonitorE2e)
672+
hackutils.CheckError("fixing test/e2e/e2e_test.go", err)
673+
}

0 commit comments

Comments
 (0)