Skip to content

Commit 6dbd387

Browse files
authored
Update acceptance-tests after gitops upgrade was changed (#323)
- Fixes up upgrade test for new gitops bin - Pulls out grabbing the gitops bin into single action that can be tweaked if needed and hopefully expanded upon in the future to perhaps get and build specific branches
1 parent 0c61713 commit 6dbd387

File tree

10 files changed

+93
-152
lines changed

10 files changed

+93
-152
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: 'Get gitops binary'
2+
description: 'Get or build the gitops binary'
3+
inputs:
4+
path:
5+
description: 'where shall it go?'
6+
required: true
7+
default: /tmp/gitops
8+
os:
9+
description: "`macOS-latest` or `ubuntu-latest`"
10+
required: false
11+
default: "ubuntu-latest"
12+
runs:
13+
using: "composite"
14+
steps:
15+
- shell: bash
16+
name: Download gitops binary from s3
17+
run: |
18+
# Not working right now
19+
# wget https://weave-gitops.s3.us-east-2.amazonaws.com/gitops-${{ inputs.os }}
20+
# mv gitops-${{ inputs.os }} ${{ inputs.path }}
21+
22+
curl -LO https://github.com/weaveworks/weave-gitops/releases/download/v0.5.0-rc2/gitops-linux-x86_64.tar.gz
23+
tar -xf gitops-linux-x86_64.tar.gz
24+
mv gitops ${{ inputs.path }}
25+
26+
# Print out Version
27+
${{ inputs.path }} version

.github/workflows/deploy.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ jobs:
9999
GITHUB_PASSWORD: ${{ secrets.WGE_GITHUB_PASSWORD }}
100100
DOCKER_IO_USER: ${{ secrets.WGE_DOCKER_IO_USER }}
101101
DOCKER_IO_PASSWORD: ${{ secrets.WGE_DOCKER_IO_PASSWORD }}
102-
GITOPS_BIN_PATH: ${{ github.workspace }}/cmd/gitops/gitops-${{ matrix.os_name }}-x86_64
102+
GITOPS_BIN_PATH: /tmp/gitops
103103
PCTL_BIN_PATH: ${{ github.workspace }}/cmd/pctl/pctl_${{ matrix.os_name }}_amd64
104104
WKP_BIN_PATH: ${{ github.workspace }}/cmd/wk/wk-v2.5.0-${{ matrix.os_name }}-amd64
105105
SELENIUM_DEBUG: true
@@ -160,11 +160,11 @@ jobs:
160160
git config --global user.email "[email protected]"
161161
git config --global user.name "test-user"
162162
git config --global url.ssh://[email protected]/.insteadOf https://github.com/
163-
- name: Download gitops binary from s3
164-
run: |
165-
mkdir -p cmd/gitops/
166-
wget https://weave-gitops.s3.us-east-2.amazonaws.com/gitops-${{ matrix.os }}
167-
mv gitops-${{ matrix.os }} $GITOPS_BIN_PATH
163+
- name: Get a gitops-binary
164+
uses: ./.github/actions/gitops-binary
165+
with:
166+
os: ${{ matrix.os }}
167+
path: ${{ env.GITOPS_BIN_PATH }}
168168
- name: Download pctl binary from GH
169169
run: |
170170
mkdir -p cmd/pctl/
@@ -177,7 +177,6 @@ jobs:
177177
curl -o $WKP_BIN_PATH https://s3.amazonaws.com/weaveworks-wkp/wk-v2.5.0-${{ matrix.os_name }}-amd64
178178
- name: Change bin permissions
179179
run: |
180-
sudo chmod +x ${{ env.GITOPS_BIN_PATH }}
181180
sudo chmod +x ${{ env.WKP_BIN_PATH }}
182181
- name: Setup selenium server
183182
if: ${{ runner.os == 'Linux' }}

.github/workflows/nightly.yaml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
GITHUB_PASSWORD: ${{ secrets.WGE_GITHUB_PASSWORD }}
3535
DOCKER_IO_USER: ${{ secrets.WGE_DOCKER_IO_USER }}
3636
DOCKER_IO_PASSWORD: ${{ secrets.WGE_DOCKER_IO_PASSWORD }}
37-
GITOPS_BIN_PATH: ${{ github.workspace }}/cmd/gitops/gitops-${{ matrix.os_name }}-x86_64
37+
GITOPS_BIN_PATH: /tmp/gitops
3838
PCTL_BIN_PATH: ${{ github.workspace }}/cmd/pctl/pctl_${{ matrix.os_name }}_amd64
3939
WKP_BIN_PATH: ${{ github.workspace }}/cmd/wk/wk-v2.5.0-${{ matrix.os_name }}-amd64
4040
WGE_ACCEPTANCE_EKS_KUBECONFIG: ${{ secrets.WGE_ACCEPTANCE_EKS_KUBECONFIG }}
@@ -112,12 +112,11 @@ jobs:
112112
git config --global user.email "[email protected]"
113113
git config --global user.name "test-user"
114114
git config --global url.ssh://[email protected]/.insteadOf https://github.com/
115-
- name: Download gitops binary from s3
116-
run: |
117-
mkdir -p cmd/gitops/
118-
119-
wget https://weave-gitops.s3.us-east-2.amazonaws.com/gitops-${{ matrix.os }}
120-
mv gitops-${{ matrix.os }} $GITOPS_BIN_PATH
115+
- name: Get a gitops-binary
116+
uses: ./.github/actions/gitops-binary
117+
with:
118+
os: ${{ matrix.os }}
119+
path: ${{ env.GITOPS_BIN_PATH }}
121120
- name: Download pctl binary from GH
122121
run: |
123122
mkdir -p cmd/pctl/
@@ -130,7 +129,6 @@ jobs:
130129
curl -o $WKP_BIN_PATH https://s3.amazonaws.com/weaveworks-wkp/wk-v2.5.0-${{ matrix.os_name }}-amd64
131130
- name: Change bin permissions
132131
run: |
133-
sudo chmod +x ${{ env.GITOPS_BIN_PATH }}
134132
sudo chmod +x ${{ env.WKP_BIN_PATH }}
135133
- name: Setup selenium server
136134
if: ${{ runner.os == 'Linux' }}
@@ -226,7 +224,7 @@ jobs:
226224
GITHUB_PASSWORD: ${{ secrets.WGE_GITHUB_PASSWORD }}
227225
DOCKER_IO_USER: ${{ secrets.WGE_DOCKER_IO_USER }}
228226
DOCKER_IO_PASSWORD: ${{ secrets.WGE_DOCKER_IO_PASSWORD }}
229-
GITOPS_BIN_PATH: ${{ github.workspace }}/cmd/gitops/gitops-${{ matrix.os_name }}-x86_64
227+
GITOPS_BIN_PATH: /tmp/gitops
230228
PCTL_BIN_PATH: ${{ github.workspace }}/cmd/pctl/pctl_${{ matrix.os_name }}_amd64
231229
WKP_BIN_PATH: ${{ github.workspace }}/cmd/wk/wk-v2.5.0-${{ matrix.os_name }}-amd64
232230
WGE_ACCEPTANCE_GCE_KUBECONFIG: ${{ secrets.WGE_ACCEPTANCE_GCE_KUBECONFIG }}
@@ -294,11 +292,11 @@ jobs:
294292
git config --global user.email "[email protected]"
295293
git config --global user.name "test-user"
296294
git config --global url.ssh://[email protected]/.insteadOf https://github.com/
297-
- name: Download gitops binary from s3
298-
run: |
299-
mkdir -p cmd/gitops/
300-
wget https://weave-gitops.s3.us-east-2.amazonaws.com/gitops-${{ matrix.os }}
301-
mv gitops-${{ matrix.os }} $GITOPS_BIN_PATH
295+
- name: Get a gitops-binary
296+
uses: ./.github/actions/gitops-binary
297+
with:
298+
os: ${{ matrix.os }}
299+
path: ${{ env.GITOPS_BIN_PATH }}
302300
- name: Download pctl binary from GH
303301
run: |
304302
mkdir -p cmd/pctl/
@@ -311,7 +309,6 @@ jobs:
311309
curl -o $WKP_BIN_PATH https://s3.amazonaws.com/weaveworks-wkp/wk-v2.5.0-${{ matrix.os_name }}-amd64
312310
- name: Change bin permissions
313311
run: |
314-
sudo chmod +x ${{ env.GITOPS_BIN_PATH }}
315312
sudo chmod +x ${{ env.WKP_BIN_PATH }}
316313
- name: Setup selenium server
317314
if: ${{ runner.os == 'Linux' }}

.github/workflows/test.yaml

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ jobs:
229229
GITHUB_ORG: ${{ secrets.WGE_GITHUB_ORG }}
230230
GITHUB_USER: ${{ secrets.WGE_GITHUB_USER }}
231231
GITHUB_PASSWORD: ${{ secrets.WGE_GITHUB_PASSWORD }}
232-
GITOPS_BIN_PATH: ${{ github.workspace }}/cmd/gitops/gitops-linux-x86_64
232+
GITOPS_BIN_PATH: /tmp/gitops
233233
SELENIUM_DEBUG: true
234234
ACCEPTANCE_TESTS_DATABASE_TYPE: sqlite
235235
WGE_ACCEPTANCE: true
@@ -277,14 +277,10 @@ jobs:
277277
git config --global user.email "[email protected]"
278278
git config --global user.name "test-user"
279279
git config --global url.ssh://[email protected]/.insteadOf https://github.com/
280-
- name: Download gitops binary from s3
281-
run: |
282-
mkdir -p cmd/gitops/
283-
wget https://weave-gitops.s3.us-east-2.amazonaws.com/gitops-ubuntu-latest
284-
mv gitops-ubuntu-latest $GITOPS_BIN_PATH
285-
- name: Change bin permissions
286-
run: |
287-
sudo chmod +x ${{ env.GITOPS_BIN_PATH }}
280+
- name: Get a gitops-binary
281+
uses: ./.github/actions/gitops-binary
282+
with:
283+
path: ${{ env.GITOPS_BIN_PATH }}
288284
- name: Setup selenium server
289285
run: |
290286
wget https://selenium-release.storage.googleapis.com/3.14/selenium-server-standalone-3.14.0.jar
@@ -330,14 +326,18 @@ jobs:
330326
GITHUB_ORG: ${{ secrets.WGE_GITHUB_ORG }}
331327
GITHUB_USER: ${{ secrets.WGE_GITHUB_USER }}
332328
GITHUB_PASSWORD: ${{ secrets.WGE_GITHUB_PASSWORD }}
333-
GITOPS_BIN_PATH: ${{ github.workspace }}/cmd/gitops/gitops-linux-x86_64
329+
GITOPS_BIN_PATH: /tmp/gitops
334330
WKP_BIN_PATH: ${{ github.workspace }}/cmd/wk/wk-v2.5.0-linux-amd64
335331
SELENIUM_DEBUG: true
336332
ACCEPTANCE_TESTS_DATABASE_TYPE: sqlite
337333
WGE_ACCEPTANCE: true
338334
CONNECT_KIND_WKP_LEAF_TEST: true
339335
ARTEFACTS_BASE_DIR: /tmp/workspace/test/
340336
steps:
337+
- name: "Setup dynamic env vars"
338+
run: |
339+
export CLUSTER_REPOSITORY=gitops-capi-template-${{ github.run_id }}-$(openssl rand -hex 8)
340+
echo "CLUSTER_REPOSITORY=$CLUSTER_REPOSITORY" >> $GITHUB_ENV
341341
- id: go-cache-paths
342342
run: |
343343
echo "::set-output name=go-build::$(go env GOCACHE)"
@@ -380,14 +380,10 @@ jobs:
380380
git config --global user.email "[email protected]"
381381
git config --global user.name "test-user"
382382
git config --global url.ssh://[email protected]/.insteadOf https://github.com/
383-
- name: Download gitops binary from s3
384-
run: |
385-
mkdir -p cmd/gitops/
386-
wget https://weave-gitops.s3.us-east-2.amazonaws.com/gitops-ubuntu-latest
387-
mv gitops-ubuntu-latest $GITOPS_BIN_PATH
388-
- name: Change bin permissions
389-
run: |
390-
sudo chmod +x ${{ env.GITOPS_BIN_PATH }}
383+
- name: Get a gitops-binary
384+
uses: ./.github/actions/gitops-binary
385+
with:
386+
path: ${{ env.GITOPS_BIN_PATH }}
391387
- name: Setup selenium server
392388
run: |
393389
wget https://selenium-release.storage.googleapis.com/3.14/selenium-server-standalone-3.14.0.jar
@@ -403,14 +399,10 @@ jobs:
403399
config: "./test/utils/data/local-kind-config.yaml"
404400
- name: Kind-check
405401
run: |
406-
kubectl get pods -A
402+
kubectl get pods -A
407403
- name: Install wego enterprise components on management cluster
408404
run: |
409-
export CLUSTER_REPOSITORY=gitops-capi-template-${{ github.run_id }}-$(openssl rand -hex 8)
410-
# Set the CLUSTER_REPOSITORY as environment variable for subsequent steps
411-
echo "CLUSTER_REPOSITORY=$CLUSTER_REPOSITORY" >> $GITHUB_ENV
412-
413-
./test/utils/scripts/wego-enterprise.sh setup ${{ github.workspace }}
405+
./test/utils/scripts/wego-enterprise.sh setup ${{ github.workspace }}
414406
- name: Run acceptance tests
415407
run: |
416408
cd test/acceptance/test/

test/acceptance/test/cli_add_delete.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,10 @@ func DescribeCliAddDelete(gitopsTestRunner GitopsTestRunner) {
452452

453453
It("@capd Verify leaf CAPD cluster can be provisioned and kubeconfig is available for cluster operations", func() {
454454

455+
By("Check wge is all running", func() {
456+
gitopsTestRunner.VerifyWegoPodsRunning()
457+
})
458+
455459
var repoAbsolutePath string
456460
By("When I create a private repository for cluster configs", func() {
457461
repoAbsolutePath = gitopsTestRunner.InitAndCreateEmptyRepo(CLUSTER_REPOSITORY, true)

test/acceptance/test/cli_upgrade.go

Lines changed: 11 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package acceptance
22

33
import (
44
"fmt"
5-
"io/ioutil"
65
"log"
76
"os/exec"
87
"path"
@@ -14,39 +13,6 @@ import (
1413
"github.com/onsi/gomega/gexec"
1514
)
1615

17-
func configureConfigMapvalues(repoAbsolutePath string, uiNodePort string, natsNodeport string, natsURL string, repositoryURL string) {
18-
pullGitRepo(repoAbsolutePath)
19-
20-
configMapYaml := path.Join(repoAbsolutePath, "upgrade", "weave-gitops-enterprise", "artifacts", "mccp-chart", "helm-chart", "ConfigMap.yaml")
21-
22-
input, err := ioutil.ReadFile(configMapYaml)
23-
Expect(err).ShouldNot(HaveOccurred())
24-
25-
lines := strings.Split(string(input), "\n")
26-
27-
for i, line := range lines {
28-
if uiNodePort != "" && strings.Contains(line, "nginx-ingress-controller") {
29-
lines = append(lines[:i+2], lines[i+1:]...)
30-
lines[i+2] = " type: NodePort"
31-
lines[i+5] = " " + uiNodePort
32-
}
33-
if natsNodeport != "" && strings.Contains(line, "nodePort: 31490") {
34-
lines[i] = " nodePort: " + natsNodeport
35-
}
36-
if natsURL != "" && strings.Contains(line, "natsURL: ") {
37-
lines[i] = " natsURL: " + natsURL
38-
}
39-
if repositoryURL != "" && strings.Contains(line, "repositoryURL: ") {
40-
lines[i] = " repositoryURL: " + repositoryURL
41-
}
42-
}
43-
44-
output := strings.Join(lines, "\n")
45-
err = ioutil.WriteFile(configMapYaml, []byte(output), 0644)
46-
Expect(err).ShouldNot(HaveOccurred())
47-
48-
}
49-
5016
func DescribeCliUpgrade(gitopsTestRunner GitopsTestRunner) {
5117
var _ = Describe("Gitops upgrade Tests", func() {
5218

@@ -76,8 +42,6 @@ func DescribeCliUpgrade(gitopsTestRunner GitopsTestRunner) {
7642
var public_ip string
7743
kind_upgrade_cluster_name := "test-upgrade"
7844

79-
appName := "wego-upgrade"
80-
appPath := "upgrade"
8145
templateFiles := []string{}
8246

8347
JustBeforeEach(func() {
@@ -113,26 +77,12 @@ func DescribeCliUpgrade(gitopsTestRunner GitopsTestRunner) {
11377

11478
By("When I create a private repository for cluster configs", func() {
11579
repoAbsolutePath = gitopsTestRunner.InitAndCreateEmptyRepo(CLUSTER_REPOSITORY, true)
116-
testFile := createTestFile("README.md", "# gitops-capi-template")
117-
118-
gitopsTestRunner.GitAddCommitPush(repoAbsolutePath, testFile)
11980
})
12081

12182
By("When I install gitops/wego to my active cluster", func() {
12283
InstallAndVerifyGitops(GITOPS_DEFAULT_NAMESPACE, GetGitRepositoryURL(repoAbsolutePath))
12384
})
12485

125-
By("And I install profile controllers to my active cluster", func() {
126-
InstallAndVerifyPctl(GITOPS_DEFAULT_NAMESPACE)
127-
})
128-
129-
addCommand := fmt.Sprintf("add app . --path=./%s --name=%s --auto-merge=true", appPath, appName)
130-
By(fmt.Sprintf("And I run gitops add app command ' %s 'in namespace %s from dir %s", addCommand, GITOPS_DEFAULT_NAMESPACE, repoAbsolutePath), func() {
131-
cmd := fmt.Sprintf("cd %s && %s %s", repoAbsolutePath, GITOPS_BIN_PATH, addCommand)
132-
_, err := runCommandAndReturnStringOutput(cmd)
133-
Expect(err).Should(BeEmpty())
134-
})
135-
13686
By("And I install the entitlement for cluster upgrade", func() {
13787
Expect(gitopsTestRunner.KubectlApply([]string{}, "../../utils/scripts/entitlement-secret.yaml"), "Failed to create/configure entitlement")
13888
})
@@ -143,19 +93,16 @@ func DescribeCliUpgrade(gitopsTestRunner GitopsTestRunner) {
14393
Expect(err).Should(BeEmpty(), "Failed to create git repository secret for cluster service")
14494
})
14595

146-
By("And I install the docker registry secret for wego enteprise components", func() {
147-
cmd := fmt.Sprintf(`kubectl create secret docker-registry docker-io-pull-secret --namespace=%s --docker-username=%s --docker-password=%s`, GITOPS_DEFAULT_NAMESPACE, DOCKER_IO_USER, DOCKER_IO_PASSWORD)
148-
_, err := runCommandAndReturnStringOutput(cmd)
149-
Expect(err).Should(BeEmpty(), "Failed to create git repository secret for cluster service")
150-
})
151-
152-
By("Then I should see gitops add command linked the repo to the cluster", func() {
153-
verifyWegoAddCommand(appName, GITOPS_DEFAULT_NAMESPACE)
96+
By("And I should update/modify the default upgrade manifest ", func() {
97+
public_ip = ClusterWorkloadNonePublicIP("KIND")
15498
})
15599

156100
prBranch := "wego-upgrade-enterprise"
157-
upgradeCommand := fmt.Sprintf("upgrade --git-repository %s/%s --branch %s --out %s", GITOPS_DEFAULT_NAMESPACE, appName, prBranch, appPath)
158-
By(fmt.Sprintf("And I run gitops upgrade command ' %s ' form firectory %s", upgradeCommand, repoAbsolutePath), func() {
101+
profileVersion := "0.0.15"
102+
By(fmt.Sprintf("And I run gitops upgrade command from directory %s", repoAbsolutePath), func() {
103+
natsURL := public_ip + ":" + NATS_NODEPORT
104+
repositoryURL := fmt.Sprintf(`https://github.com/%s/%s`, GITHUB_ORG, CLUSTER_REPOSITORY)
105+
upgradeCommand := fmt.Sprintf("upgrade --profile-version %s --app-config-url %s --branch %s --set 'agentTemplate.natsURL=%s' --set 'nats.client.service.nodePort=%s'", profileVersion, repositoryURL, prBranch, natsURL, NATS_NODEPORT)
159106
command := exec.Command("sh", "-c", fmt.Sprintf("cd %s && %s %s", repoAbsolutePath, GITOPS_BIN_PATH, upgradeCommand))
160107
session, err = gexec.Start(command, GinkgoWriter, GinkgoWriter)
161108
Expect(err).ShouldNot(HaveOccurred())
@@ -166,53 +113,26 @@ func DescribeCliUpgrade(gitopsTestRunner GitopsTestRunner) {
166113
By("Then I should see pull request created to management cluster", func() {
167114
output := session.Wait().Out.Contents()
168115

169-
re := regexp.MustCompile(`PR created.*:[\s\w\d]+(?P<URL>https.*\/\d+)`)
116+
re := regexp.MustCompile(`Pull Request created.*:[\s\w\d]+(?P<URL>https.*\/\d+)`)
170117
match := re.FindSubmatch([]byte(output))
171118
Eventually(match[1]).ShouldNot(BeNil(), "Failed to Create pull request")
172119
})
173120

174-
By("And I should update/modify the default upgrade manifest ", func() {
175-
public_ip = ClusterWorkloadNonePublicIP("KIND")
176-
natsURL := public_ip + ":" + NATS_NODEPORT
177-
repositoryURL := fmt.Sprintf(`https://github.com/%s/%s`, GITHUB_ORG, CLUSTER_REPOSITORY)
178-
gitopsTestRunner.PullBranch(repoAbsolutePath, prBranch)
179-
configureConfigMapvalues(repoAbsolutePath, UI_NODEPORT, NATS_NODEPORT, natsURL, repositoryURL)
180-
GitSetUpstream(repoAbsolutePath, prBranch)
181-
GitUpdateCommitPush(repoAbsolutePath, "")
182-
})
183-
184121
By("Then I should merge the pull request to start weave gitops enterprise upgrade", func() {
185122
gitopsTestRunner.MergePullRequest(repoAbsolutePath, prBranch)
186123
})
187124

188125
By("And I should see cluster upgraded from 'wego core' to 'wego enterprise'", func() {
189-
VerifyEnterpriseControllers("mccp-chart", GITOPS_DEFAULT_NAMESPACE)
190-
})
191-
192-
By("And I can change the config map values for the upgrade profile", func() {
193-
repositoryURL := fmt.Sprintf(`https://github.com/%s/%s`, GITHUB_ORG, CLUSTER_REPOSITORY)
194-
configureConfigMapvalues(repoAbsolutePath, "", "", "", repositoryURL)
195-
GitUpdateCommitPush(repoAbsolutePath, "")
196-
})
197-
198-
By("Then I restart the cluster service pod for capi config to take effect", func() {
199-
configmapValuesUpdated := func() bool {
200-
data, _ := runCommandAndReturnStringOutput(fmt.Sprintf(`kubectl get configmap -n %s weave-gitops-enterprise-mccp-chart-defaultvalues -o jsonpath="{.data}"`, GITOPS_DEFAULT_NAMESPACE))
201-
re := regexp.MustCompile(fmt.Sprintf(`repositoryURL:\s*(?P<url>https:.*%s)`, CLUSTER_REPOSITORY))
202-
return len(re.FindSubmatch([]byte(data))) > 0
203-
}
204-
205-
Eventually(configmapValuesUpdated, ASSERTION_2MINUTE_TIME_OUT, POLL_INTERVAL_5SECONDS).Should(BeTrue(), "ConfigMap values failed to reconcile")
206-
Expect(gitopsTestRunner.RestartDeploymentPods([]string{}, "mccp-chart-cluster-service", GITOPS_DEFAULT_NAMESPACE), "Failed restart deployment successfully")
126+
VerifyEnterpriseControllers("weave-gitops-enterprise", "mccp-", GITOPS_DEFAULT_NAMESPACE)
207127
})
208128

209129
By("And I can also use upgraded enterprise UI/CLI after port forwarding (for loadbalancer ingress controller)", func() {
210-
serviceType, _ := runCommandAndReturnStringOutput(fmt.Sprintf(`kubectl get service mccp-chart-nginx-ingress-controller -n %s -o jsonpath="{.spec.type}"`, GITOPS_DEFAULT_NAMESPACE))
130+
serviceType, _ := runCommandAndReturnStringOutput(fmt.Sprintf(`kubectl get service weave-gitops-enterprise-nginx-ingress-controller -n %s -o jsonpath="{.spec.type}"`, GITOPS_DEFAULT_NAMESPACE))
211131
if strings.Trim(serviceType, "\n") == "NodePort" {
212132
capi_endpoint_url = "http://" + public_ip + ":" + UI_NODEPORT
213133
test_ui_url = "http://" + public_ip + ":" + UI_NODEPORT
214134
} else {
215-
commandToRun := fmt.Sprintf("kubectl port-forward --namespace %s deployments.apps/mccp-chart-nginx-ingress-controller 8000:80", GITOPS_DEFAULT_NAMESPACE)
135+
commandToRun := fmt.Sprintf("kubectl port-forward --namespace %s deployments.apps/weave-gitops-enterprise-nginx-ingress-controller 8000:80", GITOPS_DEFAULT_NAMESPACE)
216136

217137
cmd := exec.Command("sh", "-c", commandToRun)
218138
session, _ := gexec.Start(cmd, GinkgoWriter, GinkgoWriter)

0 commit comments

Comments
 (0)