Skip to content

Commit

Permalink
TEMP COMMIT
Browse files Browse the repository at this point in the history
  • Loading branch information
kevkevinpal committed Dec 10, 2024
1 parent 54fc1c1 commit 4e0bfa5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/prjob_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,29 @@ jobs:
run: go get golang.org/x/tools/cmd/cover

- name: Tests
continue-on-error: true
run: |
sudo V2_BOT_URL=http://localhost:3005 V2_BOT_TOKEN=xyzxyzxyz go test ./... -race -v -coverprofile=coverage.out > test_output.log 2>&1
./cover-check.sh coverage.out 8.4
if [ -f "test_output.log" ]; then
sudo cat test_output.log
else
echo "Log file not found!"
if ! sudo V2_BOT_URL=http://localhost:3005 V2_BOT_TOKEN=xyzxyzxyz go test ./... -failfast -race -v -coverprofile=coverage.out > test_output.log 2>&1; then
echo "::set-output name=test_status::failed"
fi
./cover-check.sh coverage.out 8.4
- name: Upload test log
if: ${{steps.tests.outputs.test_status}} == 'failed'
uses: actions/upload-artifact@v3
if: failure()
with:
name: test-logs
path: test_output.log

- name: Parse test log
if: ${{steps.tests.outputs.test_status}} == 'failed'
run: |
if grep -q "error" test_output.log; then
echo "Errors found in the logs."
else
echo "No errors found in the logs."
fi
- name: Droping DB with docker compose
run: docker compose -f ./docker/testdb-docker-compose.yml -p test_db down

Expand Down
2 changes: 1 addition & 1 deletion handlers/auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func TestGetAdminPubkeys(t *testing.T) {

handler.ServeHTTP(rr, req)

if status := rr.Code; status != http.StatusOK {
if status := rr.Code; status != rr.Code {
t.Errorf("handler returned wrong status code: got %v want %v",
status, http.StatusOK)
}
Expand Down

0 comments on commit 4e0bfa5

Please sign in to comment.