Skip to content

Commit

Permalink
Merge pull request #3620 from dragon-flyings/improve
Browse files Browse the repository at this point in the history
馃尡 unify promethuse-operator url
  • Loading branch information
k8s-ci-robot committed Sep 14, 2023
2 parents 4367d15 + 24c169c commit b7e878e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/e2e/utils/test_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ func (t *TestContext) makeCertManagerURL() string {
return fmt.Sprintf(certmanagerURLTmpl, certmanagerVersion)
}

func (t *TestContext) makePrometheusOperatorURL() string {
return fmt.Sprintf(prometheusOperatorURL, prometheusOperatorVersion)
}

// InstallCertManager installs the cert manager bundle. If hasv1beta1CRs is true,
// the legacy version (which uses v1alpha2 CRs) is installed.
func (t *TestContext) InstallCertManager() error {
Expand Down Expand Up @@ -149,14 +153,14 @@ func (t *TestContext) UninstallCertManager() {

// InstallPrometheusOperManager installs the prometheus manager bundle.
func (t *TestContext) InstallPrometheusOperManager() error {
url := fmt.Sprintf(prometheusOperatorURL, prometheusOperatorVersion)
url := t.makePrometheusOperatorURL()
_, err := t.Kubectl.Apply(false, "-f", url)
return err
}

// UninstallPrometheusOperManager uninstalls the prometheus manager bundle.
func (t *TestContext) UninstallPrometheusOperManager() {
url := fmt.Sprintf(prometheusOperatorURL, prometheusOperatorVersion)
url := t.makePrometheusOperatorURL()
if _, err := t.Kubectl.Delete(false, "-f", url); err != nil {
warnError(err)
}
Expand Down

0 comments on commit b7e878e

Please sign in to comment.