konveyor / go-konveyor-tests

Apache License 2.0
1 stars 14 forks source link

Fix Hub API tests clone for given Hub PR #142

Closed aufi closed 1 month ago

aufi commented 4 months ago

go-konveyor-tests support run hub API test suite as part of E2E API test suite. In order to test open Hub PRs, it is needed checkout changes from those PRs when running E2E API tests.

There is a script doing that https://github.com/konveyor/go-konveyor-tests/tree/main/hub-api that started fail pull diverged release branches, so was updated with https://github.com/konveyor/go-konveyor-tests/pull/132, that fixed it for release branches by checkout new branch instead of pull. This introduced bug parsing github.ref from Hub PRs while checking out the PR branch, discovered on https://github.com/konveyor/tackle2-hub/pull/673

The API test branch checkout code needs to be updated to handle it correctly and avoid error like:

./hub-api/run-tests.sh refs/pull/673/merge
Cloning into '/tmp/tackle2-hub-test'...
fatal: 'origin/refs/pull/673/merge' is not a commit and a branch 'api-tests-run' cannot be created from it
aufi commented 1 month ago

Fixed with https://github.com/konveyor/go-konveyor-tests/pull/132 and https://github.com/konveyor/go-konveyor-tests/pull/175, closing.