Skip to content

Commit 5ec6a78

Browse files
committed
Add resource cleanup from gitrepo after test completion
1 parent e44df58 commit 5ec6a78

File tree

10 files changed

+82
-74
lines changed

10 files changed

+82
-74
lines changed

.github/workflows/acceptance-test.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,7 @@ jobs:
200200
key: ${{ runner.os }}-go-build-${{ env.GO_CACHE_NAME }}-${{ hashFiles('**/go.sum') }}
201201
restore-keys: |
202202
${{ runner.os }}-go-build-${{ env.GO_CACHE_NAME }}-
203-
- name: setup aws credentials
204-
if: ${{ inputs.management-cluster-kind == 'eks' }}
203+
- name: setup aws credentials
205204
uses: aws-actions/configure-aws-credentials@v1-node16
206205
with:
207206
aws-access-key-id: ${{ secrets.WGE_EKS_AWS_ACCESS_KEY_ID }}

.github/workflows/nightly.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ jobs:
4545
WGE_GITLAB_PASSWORD: ${{ secrets.WGE_ON_PREM_GITLAB_PASSWORD }}
4646
WGE_GITLAB_CLIENT_ID: ${{ secrets.WGE_ON_PREM_GITLAB_CLIENT_ID }}
4747
WGE_GITLAB_CLIENT_SECRET: ${{ secrets.WGE_ON_PREM_GITLAB_CLIENT_SECRET }}
48+
WGE_EKS_AWS_ACCESS_KEY_ID: ${{ secrets.WGE_EKS_AWS_ACCESS_KEY_ID }}
49+
WGE_EKS_AWS_SECRET_ACCESS_KEY: ${{ secrets.WGE_EKS_AWS_SECRET_ACCESS_KEY }}
4850

4951
acceptance-tests-eks-github:
5052
needs: [build]
@@ -109,6 +111,8 @@ jobs:
109111
WGE_GITLAB_CLIENT_SECRET: ${{ secrets.WGE_SAS_GITLAB_CLIENT_SECRET }}
110112
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
111113
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}
114+
WGE_EKS_AWS_ACCESS_KEY_ID: ${{ secrets.WGE_EKS_AWS_ACCESS_KEY_ID }}
115+
WGE_EKS_AWS_SECRET_ACCESS_KEY: ${{ secrets.WGE_EKS_AWS_SECRET_ACCESS_KEY }}
112116

113117
acceptance-test-results:
114118
if: ${{ always() }}

test/acceptance/test/pages/violations_page.go

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,18 @@ func (v ViolationsPage) FindViolationInList(violationMsg string) *ViolationInfor
4646
}
4747
}
4848

49-
func (v ViolationsPage) CountViolations() int {
50-
violations := v.ViolationList.All("tr")
51-
count, _ := violations.Count()
49+
func (v ViolationsPage) CountViolations(clusterName ...string) int {
50+
count := 0
51+
52+
if len(clusterName) > 0 {
53+
violations := v.ViolationList.AllByXPath(fmt.Sprintf(`//tr//td[contains(.,"%s")]`, clusterName[0]))
54+
55+
count, _ = violations.Count()
56+
} else {
57+
violations := v.ViolationList.All("tr")
58+
count, _ = violations.Count()
59+
}
60+
5261
return count
5362
}
5463

test/acceptance/test/ui_applications.go

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -791,6 +791,7 @@ func DescribeApplications(gitopsTestRunner GitopsTestRunner) {
791791

792792
defer deleteSource("git", podinfo.Source, podinfo.Namespace, "")
793793
defer cleanGitRepository(appKustomization)
794+
defer cleanGitRepository(fmt.Sprintf("./clusters/%s/%s-namespace.yaml", mgmtCluster.Name, podinfo.TargetNamespace))
794795

795796
repoAbsolutePath := configRepoAbsolutePath(gitProviderEnv)
796797
existingAppCount = getApplicationCount()
@@ -915,7 +916,6 @@ func DescribeApplications(gitopsTestRunner GitopsTestRunner) {
915916
var leafClusterkubeconfig string
916917
var clusterBootstrapCopnfig string
917918
var gitopsCluster string
918-
var appDir string
919919
var existingAppCount int
920920
patSecret := "application-pat"
921921
bootstrapLabel := "bootstrap"
@@ -931,7 +931,6 @@ func DescribeApplications(gitopsTestRunner GitopsTestRunner) {
931931

932932
ginkgo.JustBeforeEach(func() {
933933
existingAppCount = getApplicationCount()
934-
appDir = path.Join("clusters", leafCluster.Namespace, leafCluster.Name, "apps")
935934
mgmtClusterContext, _ = runCommandAndReturnStringOutput("kubectl config current-context")
936935
createCluster("kind", leafCluster.Name, "")
937936
createNamespace([]string{appNameSpace, appTargetNamespace})
@@ -946,7 +945,7 @@ func DescribeApplications(gitopsTestRunner GitopsTestRunner) {
946945
_ = gitopsTestRunner.KubectlDelete([]string{}, gitopsCluster)
947946

948947
deleteCluster("kind", leafCluster.Name, "")
949-
cleanGitRepository(appDir)
948+
cleanGitRepository(path.Join("./clusters", leafCluster.Namespace))
950949
deleteNamespace([]string{leafCluster.Namespace})
951950

952951
})
@@ -1334,7 +1333,7 @@ func DescribeApplications(gitopsTestRunner GitopsTestRunner) {
13341333
var leafClusterkubeconfig string
13351334
var clusterBootstrapCopnfig string
13361335
var gitopsCluster string
1337-
var appDir string
1336+
var appSourcePath string
13381337
var existingAppCount int
13391338
var policiesYaml string
13401339
patSecret := "application-violations-pat"
@@ -1356,7 +1355,6 @@ func DescribeApplications(gitopsTestRunner GitopsTestRunner) {
13561355
policiesYaml = path.Join(testDataPath, "policies.yaml")
13571356
// Get the count of existing applications before deploying new application
13581357
existingAppCount = getApplicationCount()
1359-
appDir = path.Join("clusters", leafCluster.Namespace, leafCluster.Name, "apps")
13601358
mgmtClusterContext, _ = runCommandAndReturnStringOutput("kubectl config current-context")
13611359

13621360
createCluster("kind", leafCluster.Name, "")
@@ -1380,8 +1378,8 @@ func DescribeApplications(gitopsTestRunner GitopsTestRunner) {
13801378
_ = gitopsTestRunner.KubectlDelete([]string{}, gitopsCluster)
13811379

13821380
deleteCluster("kind", leafCluster.Name, "")
1383-
1384-
cleanGitRepository(appDir)
1381+
cleanGitRepository(path.Join("./clusters", leafCluster.Namespace))
1382+
cleanGitRepository(appSourcePath)
13851383

13861384
deleteNamespace([]string{leafCluster.Namespace})
13871385

@@ -1396,7 +1394,7 @@ func DescribeApplications(gitopsTestRunner GitopsTestRunner) {
13961394
Namespace: appNameSpace,
13971395
TargetNamespace: appTargetNamespace,
13981396
Source: "flux-system",
1399-
Path: "./apps/podinfo",
1397+
Path: "./apps/podinfo-app-violations-manifest",
14001398
SyncInterval: "30s",
14011399
}
14021400
// App Violations data
@@ -1439,14 +1437,7 @@ func DescribeApplications(gitopsTestRunner GitopsTestRunner) {
14391437

14401438
useClusterContext(mgmtClusterContext)
14411439

1442-
ginkgo.By("Add Application/Kustomization manifests to leaf cluster's repository main branch", func() {
1443-
pullGitRepo(repoAbsolutePath)
1444-
podinfoPath := path.Join(testDataPath, "podinfo-app-violations-manifest.yaml")
1445-
createCommand := fmt.Sprintf("mkdir -p %[2]v && cp -f %[1]v %[2]v", podinfoPath, path.Join(repoAbsolutePath, "apps/podinfo"))
1446-
err := runCommandPassThrough("sh", "-c", createCommand)
1447-
gomega.Expect(err).Should(gomega.BeNil(), "Failed to run '%s'", createCommand)
1448-
gitUpdateCommitPush(repoAbsolutePath, "Adding podinfo kustomization")
1449-
})
1440+
appSourcePath = addKustomizationManifests([]string{"podinfo-app-violations-manifest.yaml"})
14501441

14511442
ginkgo.By("Install kustomization Application on leaf cluster", func() {
14521443
pullGitRepo(repoAbsolutePath)

test/acceptance/test/ui_cost_estimation.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@ func DescribeCostEstimation(gitopsTestRunner GitopsTestRunner) {
129129
})
130130

131131
// Now modify cluster for new estimated cost
132-
awsRegion = "eu-central-1"
132+
awsRegion = "ca-central-1"
133133
workerMachineCount = "5"
134-
expectedCost = 599 // for 3 control plane + 5 worker node in eu-central-1
134+
expectedCost = 574 // for 3 control plane + 5 worker node in ca-central-1
135135
parameters = []TemplateField{
136136
{
137137
Name: "AWS_REGION",
@@ -153,7 +153,7 @@ func DescribeCostEstimation(gitopsTestRunner GitopsTestRunner) {
153153
re := regexp.MustCompile(`\d+`)
154154
priceTxt, _ := costEstimation.Price.Text()
155155
price, _ := strconv.ParseFloat(re.FindAllString(priceTxt, -1)[0], 32)
156-
gomega.Expect(price).Should(gomega.BeNumerically("~", expectedCost, 10), fmt.Sprintf("Cluster stimated cost should not exceeds the expected threshold boundaries: %d <=> %d", expectedCost-10, expectedCost+10))
156+
gomega.Expect(price).Should(gomega.BeNumerically("~", expectedCost, 10), fmt.Sprintf("Cluster estimated cost should not exceeds the expected threshold boundaries: %d <=> %d", expectedCost-10, expectedCost+10))
157157
})
158158
})
159159

test/acceptance/test/ui_policies.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,17 @@ func DescribePolicies(gitopsTestRunner GitopsTestRunner) {
6161
policyName := "Container Image Pull Policy acceptance test"
6262
policyID := "weave.policies.container-image-pull-policy-acceptance-test"
6363
policyClusterName := "management"
64-
policyMode := `Audit\nEnforce`
64+
policyMode := `(Enforce|Audit)\s*(Audit|Enforce)`
6565
policySeverity := "Medium"
6666
policyCategory := "weave.categories.software-supply-chain"
6767
policyTags := []string{"There is no tags for this policy"}
6868
policyTargetedKinds := []string{"Deployment", "Job", "ReplicationController", "ReplicaSet", "DaemonSet", "StatefulSet", "CronJob"}
6969

70-
ginkgo.JustAfterEach(func() {
70+
ginkgo.JustBeforeEach(func() {
7171
policiesYaml = path.Join(testDataPath, "policies.yaml")
7272
})
7373

74-
ginkgo.JustBeforeEach(func() {
74+
ginkgo.JustAfterEach(func() {
7575
_ = gitopsTestRunner.KubectlDelete([]string{}, policiesYaml)
7676
})
7777

@@ -191,7 +191,7 @@ func DescribePolicies(gitopsTestRunner GitopsTestRunner) {
191191

192192
policyName := "Container Running As Root acceptance test"
193193
policyID := "weave.policies.container-running-as-root-acceptance-test"
194-
policyMode := `Audit\nEnforce`
194+
policyMode := `(Enforce|Audit)\s*(Audit|Enforce)`
195195
policySeverity := "High"
196196
policyCategory := "weave.categories.pod-security"
197197
policyTags := []string{"pci-dss", "cis-benchmark", "mitre-attack", "nist800-190", "gdpr", "default"}

test/acceptance/test/ui_templates.go

Lines changed: 29 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"fmt"
66
"os"
77
"path"
8+
"path/filepath"
89
"sort"
910
"strconv"
1011
"strings"
@@ -63,6 +64,22 @@ func selectCredentials(createPage *pages.CreateCluster, credentialName string, c
6364
gomega.Eventually(selectCredential, ASSERTION_30SECONDS_TIME_OUT, POLL_INTERVAL_5SECONDS).Should(gomega.BeTrue())
6465
}
6566

67+
func addKustomizationManifests(manifestYamls []string) string {
68+
manifestPath := "./apps"
69+
ginkgo.By("Add Application/Kustomization manifests to management cluster's repository main branch)", func() {
70+
repoAbsolutePath := configRepoAbsolutePath(gitProviderEnv)
71+
pullGitRepo(repoAbsolutePath)
72+
73+
for _, yaml := range manifestYamls {
74+
manifest := path.Join(testDataPath, yaml)
75+
_ = runCommandPassThrough("sh", "-c", fmt.Sprintf("mkdir -p %[2]v && cp -f %[1]v %[2]v", manifest, path.Join(repoAbsolutePath, manifestPath, strings.TrimSuffix(filepath.Base(yaml), filepath.Ext(yaml)))))
76+
}
77+
78+
gitUpdateCommitPush(repoAbsolutePath, "Adding application kustomization manifests")
79+
})
80+
return manifestPath
81+
}
82+
6683
func DescribeTemplates(gitopsTestRunner GitopsTestRunner) {
6784
var _ = ginkgo.Describe("Multi-Cluster Control Plane Templates", func() {
6885
templateFiles := []string{}
@@ -387,10 +404,6 @@ func DescribeTemplates(gitopsTestRunner GitopsTestRunner) {
387404
// Force clean the repository directory for subsequent tests
388405
cleanGitRepository(clusterPath)
389406
_ = deleteFile([]string{downloadedResourcesPath})
390-
391-
// Namespaces used for kustomization, waiting for them to terminate
392-
reconcile("reconcile", "source", "git", "flux-system", GITOPS_DEFAULT_NAMESPACE, "")
393-
waitForNamespaceDeletion([]string{"test-system"})
394407
})
395408

396409
ginkgo.It("Verify pull request can be created for capi template to the management cluster", ginkgo.Label("integration", "git", "browser-logs"), func() {
@@ -678,7 +691,7 @@ func DescribeTemplates(gitopsTestRunner GitopsTestRunner) {
678691
gomega.Expect(gitops.CreatePR.Click()).To(gomega.Succeed(), "Failed to click 'CREATE PULL REQUEST' button")
679692
})
680693

681-
ginkgo.By("Then I should not see pull request to be created", func() {
694+
ginkgo.By("Then I should not see pull request error creation message", func() {
682695
gomega.Eventually(messages.Error).Should(matchers.MatchText(fmt.Sprintf(`unable to create pull request.+unable to create new branch "%s"`, branchName)))
683696
})
684697
})
@@ -687,13 +700,13 @@ func DescribeTemplates(gitopsTestRunner GitopsTestRunner) {
687700
ginkgo.Context("[UI] When no infrastructure provider credentials are available in the management cluster", func() {
688701
ginkgo.It("Verify no credentials exists in management cluster", ginkgo.Label("integration", "git"), func() {
689702
ginkgo.By("Apply/Install CAPITemplate", func() {
690-
templateFiles = gitopsTestRunner.CreateApplyCapitemplates(1, "capi-template-capd.yaml")
703+
templateFiles = gitopsTestRunner.CreateApplyCapitemplates(1, "templates/aws/cluster-template-eks.yaml")
691704
})
692705

693706
navigateToTemplatesGrid(webDriver)
694707

695708
ginkgo.By("And User should choose a template", func() {
696-
templateTile := pages.GetTemplateTile(webDriver, "cluster-template-development-0")
709+
templateTile := pages.GetTemplateTile(webDriver, "capa-cluster-template-eks-0")
697710
gomega.Expect(templateTile.CreateTemplate.Click()).To(gomega.Succeed())
698711
})
699712

@@ -923,6 +936,7 @@ func DescribeTemplates(gitopsTestRunner GitopsTestRunner) {
923936
var crsConfigmap string
924937
var downloadedKubeconfigPath string
925938
var capdCluster ClusterConfig
939+
var appSourcePath string
926940

927941
clusterNamespace := map[string]string{
928942
GitProviderGitLab: "capi-test-system",
@@ -954,25 +968,16 @@ func DescribeTemplates(gitopsTestRunner GitopsTestRunner) {
954968
reconcile("suspend", "source", "git", "flux-system", GITOPS_DEFAULT_NAMESPACE, "")
955969
// Force clean the repository directory for subsequent tests
956970
cleanGitRepository(clusterPath)
957-
cleanGitRepository(path.Join("./clusters", capdCluster.Namespace, capdCluster.Name))
971+
cleanGitRepository(path.Join("./clusters", capdCluster.Namespace))
972+
cleanGitRepository(appSourcePath)
958973
// Force delete capicluster incase delete PR fails to delete to free resources
959974
removeGitopsCapiClusters([]ClusterConfig{capdCluster})
960975
reconcile("resume", "source", "git", "flux-system", GITOPS_DEFAULT_NAMESPACE, "")
961976
})
962977

963978
ginkgo.It("Verify leaf CAPD cluster can be provisioned and kubeconfig is available for cluster operations", ginkgo.Label("smoke", "integration", "capd", "git", "browser-logs"), func() {
964979
repoAbsolutePath := configRepoAbsolutePath(gitProviderEnv)
965-
966-
ginkgo.By("Add Application/Kustomization manifests to management cluster's repository main branch)", func() {
967-
pullGitRepo(repoAbsolutePath)
968-
postgres := path.Join(testDataPath, "postgres-manifest.yaml")
969-
_ = runCommandPassThrough("sh", "-c", fmt.Sprintf("mkdir -p %[2]v && cp -f %[1]v %[2]v", postgres, path.Join(repoAbsolutePath, "apps/postgres")))
970-
971-
podinfo := path.Join(testDataPath, "podinfo-manifest.yaml")
972-
_ = runCommandPassThrough("sh", "-c", fmt.Sprintf("mkdir -p %[2]v && cp -f %[1]v %[2]v", podinfo, path.Join(repoAbsolutePath, "apps/podinfo")))
973-
974-
gitUpdateCommitPush(repoAbsolutePath, "Adding postgres kustomization")
975-
})
980+
appSourcePath = addKustomizationManifests([]string{"postgres-manifest.yaml", "podinfo-manifest.yaml"})
976981

977982
ginkgo.By("Then I Apply/Install CAPITemplate", func() {
978983
templateFiles = gitopsTestRunner.CreateApplyCapitemplates(1, "capi-template-capd.yaml")
@@ -1073,7 +1078,7 @@ func DescribeTemplates(gitopsTestRunner GitopsTestRunner) {
10731078
Name: "postgres",
10741079
Namespace: GITOPS_DEFAULT_NAMESPACE,
10751080
TargetNamespace: GITOPS_DEFAULT_NAMESPACE,
1076-
Path: "apps/postgres",
1081+
Path: "apps/postgres-manifest",
10771082
}
10781083
gomega.Expect(createPage.AddApplication.Click()).Should(gomega.Succeed(), "Failed to click 'Add application' button")
10791084
application := pages.GetAddApplication(webDriver, 1)
@@ -1084,7 +1089,7 @@ func DescribeTemplates(gitopsTestRunner GitopsTestRunner) {
10841089
Name: "podinfo",
10851090
Namespace: GITOPS_DEFAULT_NAMESPACE,
10861091
TargetNamespace: GITOPS_DEFAULT_NAMESPACE,
1087-
Path: "apps/podinfo",
1092+
Path: "apps/podinfo-manifest",
10881093
}
10891094
gomega.Expect(createPage.AddApplication.Click()).Should(gomega.Succeed(), "Failed to click 'Add application' button")
10901095
application = pages.GetAddApplication(webDriver, 2)
@@ -1242,17 +1247,7 @@ func DescribeTemplates(gitopsTestRunner GitopsTestRunner) {
12421247

12431248
ginkgo.It("Verify CAPI cluster resource can be modified/edited", ginkgo.Label("integration", "capd", "git"), func() {
12441249
repoAbsolutePath := configRepoAbsolutePath(gitProviderEnv)
1245-
1246-
ginkgo.By("Add Application/Kustomization manifests to management cluster's repository main branch)", func() {
1247-
pullGitRepo(repoAbsolutePath)
1248-
postgres := path.Join(testDataPath, "postgres-manifest.yaml")
1249-
_ = runCommandPassThrough("sh", "-c", fmt.Sprintf("mkdir -p %[2]v && cp -f %[1]v %[2]v", postgres, path.Join(repoAbsolutePath, "apps/postgres")))
1250-
1251-
podinfo := path.Join(testDataPath, "podinfo-manifest.yaml")
1252-
_ = runCommandPassThrough("sh", "-c", fmt.Sprintf("mkdir -p %[2]v && cp -f %[1]v %[2]v", podinfo, path.Join(repoAbsolutePath, "apps/podinfo")))
1253-
1254-
gitUpdateCommitPush(repoAbsolutePath, "Adding postgres kustomization")
1255-
})
1250+
appSourcePath = addKustomizationManifests([]string{"postgres-manifest.yaml", "podinfo-manifest.yaml"})
12561251

12571252
ginkgo.By("Then I Apply/Install CAPITemplate", func() {
12581253
templateFiles = gitopsTestRunner.CreateApplyCapitemplates(1, "capi-template-capd.yaml")
@@ -1352,7 +1347,7 @@ func DescribeTemplates(gitopsTestRunner GitopsTestRunner) {
13521347
Name: "postgres",
13531348
Namespace: GITOPS_DEFAULT_NAMESPACE,
13541349
TargetNamespace: GITOPS_DEFAULT_NAMESPACE,
1355-
Path: "apps/postgres",
1350+
Path: "apps/postgres-manifest",
13561351
}
13571352
gomega.Expect(createPage.AddApplication.Click()).Should(gomega.Succeed(), "Failed to click 'Add application' button")
13581353
application := pages.GetAddApplication(webDriver, 1)
@@ -1472,7 +1467,7 @@ func DescribeTemplates(gitopsTestRunner GitopsTestRunner) {
14721467
Name: "podinfo",
14731468
Namespace: GITOPS_DEFAULT_NAMESPACE,
14741469
TargetNamespace: "test-system",
1475-
Path: "apps/podinfo",
1470+
Path: "apps/podinfo-manifest",
14761471
}
14771472
gomega.Expect(createPage.AddApplication.Click()).Should(gomega.Succeed(), "Failed to click 'Add application' button")
14781473
application = pages.GetAddApplication(webDriver, 1)

test/acceptance/test/ui_tenant.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ func DescribeTenants(gitopsTestRunner GitopsTestRunner) {
107107
appKustomization := fmt.Sprintf("./clusters/%s/%s-%s-kustomization.yaml", mgmtCluster.Name, podinfo.Name, podinfo.Namespace)
108108
defer deleteSource("git", podinfo.Source, podinfo.Namespace, "")
109109
defer cleanGitRepository(appKustomization)
110+
defer cleanGitRepository(fmt.Sprintf("./clusters/%s/%s-namespace.yaml", mgmtCluster.Name, podinfo.TargetNamespace))
110111

111112
repoAbsolutePath := configRepoAbsolutePath(gitProviderEnv)
112113
pages.NavigateToPage(webDriver, "Applications")
@@ -290,7 +291,6 @@ func DescribeTenants(gitopsTestRunner GitopsTestRunner) {
290291
var leafClusterkubeconfig string
291292
var clusterBootstrapCopnfig string
292293
var gitopsCluster string
293-
var appDir string
294294
existingAppCount := 0
295295
patSecret := "application-pat"
296296
bootstrapLabel := "bootstrap"
@@ -311,7 +311,6 @@ func DescribeTenants(gitopsTestRunner GitopsTestRunner) {
311311
}
312312

313313
createNamespace([]string{appNameSpace, appTargetNamespace})
314-
appDir = path.Join("clusters", leafCluster.Namespace, leafCluster.Name, "apps")
315314
mgmtClusterContext, _ = runCommandAndReturnStringOutput("kubectl config current-context")
316315
createCluster("kind", leafCluster.Name, "")
317316
leafClusterContext, _ = runCommandAndReturnStringOutput("kubectl config current-context")
@@ -325,7 +324,7 @@ func DescribeTenants(gitopsTestRunner GitopsTestRunner) {
325324
_ = gitopsTestRunner.KubectlDelete([]string{}, gitopsCluster)
326325

327326
deleteCluster("kind", leafCluster.Name, "")
328-
cleanGitRepository(appDir)
327+
cleanGitRepository(path.Join("./clusters", leafCluster.Namespace))
329328
deleteNamespace([]string{leafCluster.Namespace})
330329
})
331330

0 commit comments

Comments
 (0)