mirror of
https://github.com/SaraSmiseth/prosody.git
synced 2025-05-12 05:27:34 +00:00
Renamed STORAGE to DEFAULT_STORAGE. Added ARCHIVE_STORE and STORAGE_ARCHIVE2.
This commit is contained in:
parent
eb572d8180
commit
bce67be67d
7 changed files with 93 additions and 38 deletions
|
@ -32,7 +32,27 @@ services:
|
|||
E2E_POLICY_WHITELIST: "admin@localhost, user1@localhost"
|
||||
LOG_LEVEL: debug
|
||||
PROSODY_ADMINS: "admin@localhost, admin2@localhost"
|
||||
STORAGE: "internal"
|
||||
DEFAULT_STORAGE: "internal"
|
||||
STORAGE_ARCHIVE2: "internal"
|
||||
volumes:
|
||||
- ./certs:/usr/local/etc/prosody/certs
|
||||
|
||||
prosody_internal_storage_archive:
|
||||
image: prosody
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "5000:5000"
|
||||
- "5222:5222"
|
||||
- "5223:5223"
|
||||
- "5269:5269"
|
||||
- "5281:5281"
|
||||
environment:
|
||||
DOMAIN: localhost
|
||||
E2E_POLICY_WHITELIST: "admin@localhost, user1@localhost"
|
||||
LOG_LEVEL: debug
|
||||
PROSODY_ADMINS: "admin@localhost, admin2@localhost"
|
||||
DEFAULT_STORAGE: "internal"
|
||||
ARCHIVE_STORE: "archive"
|
||||
volumes:
|
||||
- ./certs:/usr/local/etc/prosody/certs
|
||||
|
||||
|
|
|
@ -64,14 +64,20 @@ registerTestUsers prosody_postgres
|
|||
runTests prosody_postgres
|
||||
sudo docker-compose down
|
||||
|
||||
# Run tests for second container with SQLite
|
||||
# Run tests for container with SQLite
|
||||
sudo docker-compose up -d prosody
|
||||
registerTestUsers prosody
|
||||
runTests prosody
|
||||
sudo docker-compose down
|
||||
|
||||
# Run tests for third container with internal storage
|
||||
# Run tests for container with internal storage and archive store archive2
|
||||
sudo docker-compose up -d prosody_internal_storage
|
||||
registerTestUsers prosody_internal_storage
|
||||
runTests prosody_internal_storage
|
||||
sudo docker-compose down
|
||||
|
||||
# Run tests for container with internal storage and archive store archive
|
||||
sudo docker-compose up -d prosody_internal_storage_archive
|
||||
registerTestUsers prosody_internal_storage_archive
|
||||
runTests prosody_internal_storage_archive
|
||||
sudo docker-compose down
|
||||
|
|
21
tests/tests-prosody_internal_storage_archive.bats
Normal file
21
tests/tests-prosody_internal_storage_archive.bats
Normal file
|
@ -0,0 +1,21 @@
|
|||
# For tests with pipes see: https://github.com/sstephenson/bats/issues/10
|
||||
|
||||
load 'bats/bats-support/load'
|
||||
load 'bats/bats-assert/load'
|
||||
|
||||
# TODO
|
||||
#@test "Should use internal storage" {
|
||||
# run bash -c "sudo docker-compose logs $batsContainerName | grep -E \"Connecting to \[SQLite3\] \/usr\/local\/var\/lib\/prosody\/prosody\.sqlite\.\.\.\""
|
||||
# assert_failure
|
||||
# assert_output
|
||||
#}
|
||||
|
||||
@test "Should not use sqlite" {
|
||||
run bash -c "sudo docker-compose logs $batsContainerName | grep -E \"Connecting to \[SQLite3\] \/usr\/local\/var\/lib\/prosody\/prosody\.sqlite\.\.\.\""
|
||||
assert_failure
|
||||
}
|
||||
|
||||
@test "Should not use postgres" {
|
||||
run bash -c "sudo docker-compose logs $batsContainerName | grep -E \"Connecting to \[PostgreSQL\] prosody\.\.\.\""
|
||||
assert_failure
|
||||
}
|
|
@ -86,3 +86,8 @@ load 'bats/bats-assert/load'
|
|||
assert_success
|
||||
assert_output
|
||||
}
|
||||
|
||||
@test "Should not have any sql errors" {
|
||||
run bash -c "sudo docker-compose logs $batsContainerName | grep --ignore-case Error in SQL transaction"
|
||||
assert_failure
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue