Skip to content

Commit

Permalink
Improve tests
Browse files Browse the repository at this point in the history
  • Loading branch information
trnubo committed Jan 11, 2024
1 parent 589d061 commit 99d344b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tests/main.bats
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
load functions.bash
load setup.bash

@test "smoke test" {
# Simple check to see if the health api returns OK
@test "check health api" {
run curl -sSf http://127.0.0.1:${cmak_port}/api/health
# diag "${output}"
[[ "${status}" -eq 0 ]]
}

# Under some versions of java cmak seems to fail to serve some assets. This
# test loads the home page and tried to download any assets to check that
# they can be downloaded.
@test "check home page and assets" {
run wget -P "${BATS_TEST_TMPDIR}" -r -p -k http://127.0.0.1:${cmak_port}/
# diag "${output}"
[[ "${status}" -eq 0 ]]
}

0 comments on commit 99d344b

Please sign in to comment.