Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set pipefail to the script and log org/repo details on timeout exceeded #148

Merged
merged 2 commits into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ jobs:
run: sudo mkdir -p /artifacts-logs && sudo chmod 777 /artifacts-logs

- name: Run integration tests
run: go run ./test/integration/e2e.go 2>&1 | tee /artifacts-logs/e2e.log
run: |
set -o pipefail
set -o errexit
go run ./test/integration/e2e.go 2>&1 | tee /artifacts-logs/e2e.log
env:
GARM_BASE_URL: ${{ steps.ngrok.outputs.tunnel-url }}
GARM_USERNAME: admin
Expand Down
8 changes: 8 additions & 0 deletions test/integration/e2e.go
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,10 @@ func WaitRepoInstance(timeout time.Duration) {
time.Sleep(5 * time.Second)
timeWaited += 5
}
repo, err := getRepo(cli, authToken, repoID)
handleError(err)
printResponse(repo)

instanceDetails, err := getInstance(cli, authToken, instance.Name)
handleError(err)
printResponse(instanceDetails)
Expand Down Expand Up @@ -823,6 +827,10 @@ func WaitOrgInstance(timeout time.Duration) {
time.Sleep(5 * time.Second)
timeWaited += 5
}
org, err := getOrg(cli, authToken, orgID)
handleError(err)
printResponse(org)

instanceDetails, err := getInstance(cli, authToken, instance.Name)
handleError(err)
printResponse(instanceDetails)
Expand Down