From 616052d9cc6867be535fd468e343e29addf38236 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sara=20Aim=C3=A9e=20Smiseth?= <51710585+SaraSmiseth@users.noreply.github.com> Date: Tue, 6 Oct 2020 18:58:51 +0200 Subject: [PATCH] wip tests 7 --- .gitmodules | 9 +++++++++ tests/bats/bats-assert | 1 + tests/bats/bats-core | 1 + tests/bats/bats-support | 1 + tests/test.zsh | 7 +++---- tests/tests.bats | 8 ++++++++ 6 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 .gitmodules create mode 160000 tests/bats/bats-assert create mode 160000 tests/bats/bats-core create mode 160000 tests/bats/bats-support create mode 100644 tests/tests.bats 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" +}