mirror of
https://github.com/SaraSmiseth/prosody.git
synced 2025-04-19 16:01:14 +00:00
Add tests that check if postgres or sqlite is used.
This commit is contained in:
parent
6c5d334cef
commit
02ae15a8b3
5 changed files with 24 additions and 3 deletions
|
@ -1 +1 @@
|
|||
Subproject commit 0a8dd57e2cc6d4cc064b1ed6b4e79b9f7fee096f
|
||||
Subproject commit e0de84e9c011223e7f88b7ccf1c929f4327097ba
|
|
@ -1 +1 @@
|
|||
Subproject commit 8fb853a6cbc0169958707381985f3cd59789ccb1
|
||||
Subproject commit 49b377a751e6f9379abfdfb3dfa3aafabd8495a1
|
|
@ -43,7 +43,8 @@ runTests() {
|
|||
&& sleep 5 \
|
||||
&& sudo docker-compose logs "$containerName" \
|
||||
&& export batsContainerName="$containerName" \
|
||||
&& ./bats/bats-core/bin/bats tests.bats
|
||||
&& ./bats/bats-core/bin/bats tests.bats \
|
||||
&& ./bats/bats-core/bin/bats tests-"$containerName".bats
|
||||
}
|
||||
|
||||
generateCert "localhost"
|
||||
|
|
10
tests/tests-prosody.bats
Normal file
10
tests/tests-prosody.bats
Normal file
|
@ -0,0 +1,10 @@
|
|||
# For tests with pipes see: https://github.com/sstephenson/bats/issues/10
|
||||
|
||||
load 'bats/bats-support/load'
|
||||
load 'bats/bats-assert/load'
|
||||
|
||||
@test "Should use sqlite" {
|
||||
run bash -c "sudo docker-compose logs $batsContainerName | grep -E \"Connecting to \[SQLite3\] \/usr\/local\/var\/lib\/prosody\/prosody\.sqlite\.\.\.\""
|
||||
assert_success
|
||||
assert_output
|
||||
}
|
10
tests/tests-prosody_postgres.bats
Normal file
10
tests/tests-prosody_postgres.bats
Normal file
|
@ -0,0 +1,10 @@
|
|||
# For tests with pipes see: https://github.com/sstephenson/bats/issues/10
|
||||
|
||||
load 'bats/bats-support/load'
|
||||
load 'bats/bats-assert/load'
|
||||
|
||||
@test "Should use postgres" {
|
||||
run bash -c "sudo docker-compose logs $batsContainerName | grep -E \"Connecting to \[PostgreSQL\] prosody\.\.\.\""
|
||||
assert_success
|
||||
assert_output
|
||||
}
|
Loading…
Reference in a new issue