Skip to content

Commit 1a83a4c

Browse files
authored
👻 API-test action (konveyor#749)
Signed-off-by: Jeff Ortel <[email protected]>
1 parent cd7d9ed commit 1a83a4c

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.github/workflows/main.yml

+7-3
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,20 @@ jobs:
5252
- build
5353
- test-unit
5454
runs-on: ubuntu-latest
55+
env:
56+
DISCONNECTED: 1
57+
HUB_BASE_URL: http://localhost:8080
58+
DB_PATH: /tmp/hub.db
5559
steps:
5660
- uses: actions/checkout@v4
5761
- uses: actions/setup-go@v3
5862
with:
5963
go-version: '1.19'
6064
- run: |
61-
DISCONNECTED=1 make run &
65+
rm -f $DB_PATH
66+
make run &
6267
sleep 15 # probably a dirty solution
63-
DISCONNECTED=1 HUB_BASE_URL=http://localhost:8080 make test-api
64-
DISCONNECTED=1 HUB_BASE_URL=http://localhost:8080 make test-api # Intentionaly run 2x to catch data left in Hub DB.
68+
make test-api
6569
6670
build-image:
6771
needs:

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ test:
143143

144144
# Run Hub REST API tests.
145145
test-api:
146-
HUB_BASE_URL=$(HUB_BASE_URL) go test -count=1 -p=1 -v ./test/api/...
146+
HUB_BASE_URL=$(HUB_BASE_URL) go test -count=1 -p=1 -v -failfast ./test/api/...
147147

148148
# Run Hub test suite.
149149
test-all: test-unit test-api

0 commit comments

Comments
 (0)