From eaa38a1ed3443d79cd1289be3dd29b6737c9d524 Mon Sep 17 00:00:00 2001 From: josecordaz Date: Thu, 13 May 2021 16:49:02 -0500 Subject: [PATCH] Fixed acceptance tests (#153) * Refactor on acceptance tests to use org from GITHUB_ORG Bug fixes: - Fixed kustomization file using path as name - When running locally git init does not generate default main branch I added git checkout -b main without checking error. - Fixed name kustomization name file. * Fixed lint issue * Added documentation for env vars used to run acceptance tests locally * Fixed lint issue --- test/acceptance/test/core_operations_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/acceptance/test/core_operations_test.go b/test/acceptance/test/core_operations_test.go index 28cf7d2f1f1..313ccd88ee5 100644 --- a/test/acceptance/test/core_operations_test.go +++ b/test/acceptance/test/core_operations_test.go @@ -168,7 +168,7 @@ func ensureWegoRepoIsAbsent() error { if err != nil { return err } - url := fmt.Sprintf("https://github.com/wkp-example-org/%s", name) + url := fmt.Sprintf("https://github.com/%s/%s", os.Getenv("GITHUB_ORG"), name) ref, err := gitprovider.ParseOrgRepositoryURL(url) if err != nil { return err @@ -288,7 +288,7 @@ func setUpTestRepo() error { return err } - cloneurl := fmt.Sprintf("https://github.com/wkp-example-org/%s", name) + cloneurl := fmt.Sprintf("https://github.com/%s/%s", os.Getenv("GITHUB_ORG"), name) ref, err := gitprovider.ParseOrgRepositoryURL(cloneurl) if err != nil { return err @@ -332,7 +332,7 @@ func deleteRepos() error { if err != nil { return err } - url := fmt.Sprintf("https://github.com/wkp-example-org/%s", name) + url := fmt.Sprintf("https://github.com/%s/%s", os.Getenv("GITHUB_ORG"), name) ref, err := gitprovider.ParseOrgRepositoryURL(url) if err != nil { return err @@ -349,7 +349,7 @@ func deleteRepos() error { if err != nil { return err } - url = fmt.Sprintf("https://github.com/wkp-example-org/%s", name) + url = fmt.Sprintf("https://github.com/%s/%s", os.Getenv("GITHUB_ORG"), name) ref, err = gitprovider.ParseOrgRepositoryURL(url) if err != nil { return err