diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..4608d8c --- /dev/null +++ b/.gitmodules @@ -0,0 +1,9 @@ +[submodule "tests/bats/bats-support"] + path = tests/bats/bats-support + url = https://github.com/bats-core/bats-support.git +[submodule "tests/bats/bats-core"] + path = tests/bats/bats-core + url = https://github.com/bats-core/bats-core.git +[submodule "tests/bats/bats-assert"] + path = tests/bats/bats-assert + url = https://github.com/bats-core/bats-assert.git diff --git a/tests/bats/bats-assert b/tests/bats/bats-assert new file mode 160000 index 0000000..0a8dd57 --- /dev/null +++ b/tests/bats/bats-assert @@ -0,0 +1 @@ +Subproject commit 0a8dd57e2cc6d4cc064b1ed6b4e79b9f7fee096f diff --git a/tests/bats/bats-core b/tests/bats/bats-core new file mode 160000 index 0000000..8fb853a --- /dev/null +++ b/tests/bats/bats-core @@ -0,0 +1 @@ +Subproject commit 8fb853a6cbc0169958707381985f3cd59789ccb1 diff --git a/tests/bats/bats-support b/tests/bats/bats-support new file mode 160000 index 0000000..d140a65 --- /dev/null +++ b/tests/bats/bats-support @@ -0,0 +1 @@ +Subproject commit d140a65044b2d6810381935ae7f0c94c7023c8c3 diff --git a/tests/test.zsh b/tests/test.zsh index 96f81c3..9baaac7 100755 --- a/tests/test.zsh +++ b/tests/test.zsh @@ -35,12 +35,11 @@ sudo docker-compose down \ && pytest \ && deactivate \ && sleep 1 \ -&& sudo docker-compose logs | grep "message to" \ -&& sudo docker-compose logs | grep "type='error'" +&& ./bats/bats-core/bin/bats tests.bats +#&& sudo docker-compose logs | grep "message to" \ +#&& sudo docker-compose logs | grep "type='error'" # Received[c2s]: # Should be five times in log -# TODO Call bats and create tests to check log output - sudo docker-compose down diff --git a/tests/tests.bats b/tests/tests.bats new file mode 100644 index 0000000..218487e --- /dev/null +++ b/tests/tests.bats @@ -0,0 +1,8 @@ +load 'bats/bats-support/load' +load 'bats/bats-assert/load' + +@test "TODO write test" { + run false + assert_success + assert_output "TODO" +}