wip tests 7

This commit is contained in:
Sara Aimée Smiseth 2020-10-06 18:58:51 +02:00
parent d064d7b3de
commit 616052d9cc
6 changed files with 23 additions and 4 deletions

9
.gitmodules vendored Normal file
View file

@ -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

@ -0,0 +1 @@
Subproject commit 0a8dd57e2cc6d4cc064b1ed6b4e79b9f7fee096f

1
tests/bats/bats-core Submodule

@ -0,0 +1 @@
Subproject commit 8fb853a6cbc0169958707381985f3cd59789ccb1

@ -0,0 +1 @@
Subproject commit d140a65044b2d6810381935ae7f0c94c7023c8c3

View file

@ -35,12 +35,11 @@ sudo docker-compose down \
&& pytest \ && pytest \
&& deactivate \ && deactivate \
&& sleep 1 \ && sleep 1 \
&& sudo docker-compose logs | grep "message to" \ && ./bats/bats-core/bin/bats tests.bats
&& sudo docker-compose logs | grep "type='error'"
#&& sudo docker-compose logs | grep "message to" \
#&& sudo docker-compose logs | grep "type='error'"
# Received[c2s]: <message to='*@localhost' * type='chat'> # Received[c2s]: <message to='*@localhost' * type='chat'>
# Should be five times in log # Should be five times in log
# TODO Call bats and create tests to check log output
sudo docker-compose down sudo docker-compose down

8
tests/tests.bats Normal file
View file

@ -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"
}