Skip to content

Commit

Permalink
Fixed acceptance tests (#153)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
josecordaz authored and Justin Thompson committed May 17, 2021
1 parent 18f8542 commit eaa38a1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/acceptance/test/core_operations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit eaa38a1

Please sign in to comment.