Skip to content

Commit b7e878e

Browse files
authored
Merge pull request #3620 from dragon-flyings/improve
🌱 unify promethuse-operator url
2 parents 4367d15 + 24c169c commit b7e878e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/e2e/utils/test_context.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ func (t *TestContext) makeCertManagerURL() string {
122122
return fmt.Sprintf(certmanagerURLTmpl, certmanagerVersion)
123123
}
124124

125+
func (t *TestContext) makePrometheusOperatorURL() string {
126+
return fmt.Sprintf(prometheusOperatorURL, prometheusOperatorVersion)
127+
}
128+
125129
// InstallCertManager installs the cert manager bundle. If hasv1beta1CRs is true,
126130
// the legacy version (which uses v1alpha2 CRs) is installed.
127131
func (t *TestContext) InstallCertManager() error {
@@ -149,14 +153,14 @@ func (t *TestContext) UninstallCertManager() {
149153

150154
// InstallPrometheusOperManager installs the prometheus manager bundle.
151155
func (t *TestContext) InstallPrometheusOperManager() error {
152-
url := fmt.Sprintf(prometheusOperatorURL, prometheusOperatorVersion)
156+
url := t.makePrometheusOperatorURL()
153157
_, err := t.Kubectl.Apply(false, "-f", url)
154158
return err
155159
}
156160

157161
// UninstallPrometheusOperManager uninstalls the prometheus manager bundle.
158162
func (t *TestContext) UninstallPrometheusOperManager() {
159-
url := fmt.Sprintf(prometheusOperatorURL, prometheusOperatorVersion)
163+
url := t.makePrometheusOperatorURL()
160164
if _, err := t.Kubectl.Delete(false, "-f", url); err != nil {
161165
warnError(err)
162166
}

0 commit comments

Comments
 (0)