mirror of
https://github.com/SaraSmiseth/prosody.git
synced 2025-04-19 16:01:14 +00:00
wip tests 8
This commit is contained in:
parent
616052d9cc
commit
31923e9a09
2 changed files with 11 additions and 8 deletions
|
@ -37,9 +37,4 @@ sudo docker-compose down \
|
||||||
&& sleep 1 \
|
&& sleep 1 \
|
||||||
&& ./bats/bats-core/bin/bats tests.bats
|
&& ./bats/bats-core/bin/bats tests.bats
|
||||||
|
|
||||||
#&& sudo docker-compose logs | grep "message to" \
|
|
||||||
#&& sudo docker-compose logs | grep "type='error'"
|
|
||||||
# Received[c2s]: <message to='*@localhost' * type='chat'>
|
|
||||||
# Should be five times in log
|
|
||||||
|
|
||||||
sudo docker-compose down
|
sudo docker-compose down
|
||||||
|
|
|
@ -1,8 +1,16 @@
|
||||||
|
# For tests with pipes see: https://github.com/sstephenson/bats/issues/10
|
||||||
|
|
||||||
load 'bats/bats-support/load'
|
load 'bats/bats-support/load'
|
||||||
load 'bats/bats-assert/load'
|
load 'bats/bats-assert/load'
|
||||||
|
|
||||||
@test "TODO write test" {
|
@test "Should send 5 messages" {
|
||||||
run false
|
run bash -c "sudo docker-compose logs | grep \"Received\[c2s\]: <message type='chat' to='.*@localhost' id=':.*'>\" | wc -l"
|
||||||
assert_success
|
assert_success
|
||||||
assert_output "TODO"
|
assert_output "5"
|
||||||
|
}
|
||||||
|
|
||||||
|
@test "Should log error for user with wrong password" {
|
||||||
|
run bash -c "sudo docker-compose logs | grep \"Session closed by remote with error: undefined-condition (user intervention: authentication failed: authentication aborted by user)\""
|
||||||
|
assert_success
|
||||||
|
assert_output
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue