mirror of
https://github.com/SaraSmiseth/prosody.git
synced 2025-05-04 21:20:38 +00:00
Update prosody to version 0.12.0 (#35)
* Update luarocks to 3.9.0 * Update tests for prosody version 0.12.0
This commit is contained in:
parent
13d9c1b9d1
commit
7a4ebd68d8
6 changed files with 29 additions and 29 deletions
|
@ -3,41 +3,40 @@
|
|||
load 'bats/bats-support/load'
|
||||
load 'bats/bats-assert/load'
|
||||
|
||||
# group alternation in regex because the xml properties switch around. sometimes 'type=...' comes after 'to=...' and sometimes before
|
||||
@test "Should send 5 messages" {
|
||||
run bash -c "sudo docker-compose logs $batsContainerName | grep -E \"Received\[c2s\]: <message (type='chat'|to='.*@localhost'|id=':.*') (type='chat'|to='.*@localhost'|id=':.*') (type='chat'|to='.*@localhost'|id=':.*')>\" | wc -l"
|
||||
run bash -c "sudo docker-compose logs $batsContainerName | grep -E \"Received\[c2s\]: <message\" | wc -l"
|
||||
assert_success
|
||||
assert_output "5"
|
||||
}
|
||||
|
||||
@test "Should select certificate for localhost" {
|
||||
run bash -c "sudo docker-compose logs $batsContainerName | grep \"Selecting certificate /usr/local/etc/prosody/certs/localhost/fullchain.pem with key /usr/local/etc/prosody/certs/localhost/privkey.pem for localhost\" | wc -l"
|
||||
run bash -c "sudo docker-compose logs $batsContainerName | grep \"Certificates loaded\" | grep \" localhost:tls\" | wc -l"
|
||||
assert_success
|
||||
assert_output "3"
|
||||
assert_output "1"
|
||||
}
|
||||
|
||||
@test "Should select certificate for conference.localhost" {
|
||||
run bash -c "sudo docker-compose logs $batsContainerName | grep \"Selecting certificate /usr/local/etc/prosody/certs/conference.localhost/fullchain.pem with key /usr/local/etc/prosody/certs/conference.localhost/privkey.pem for conference.localhost\" | wc -l"
|
||||
run bash -c "sudo docker-compose logs $batsContainerName | grep \"Certificates loaded\" | grep \"conference.localhost:tls\" | wc -l"
|
||||
assert_success
|
||||
assert_output "3"
|
||||
assert_output "1"
|
||||
}
|
||||
|
||||
@test "Should select certificate for proxy.localhost" {
|
||||
run bash -c "sudo docker-compose logs $batsContainerName | grep \"Selecting certificate /usr/local/etc/prosody/certs/proxy.localhost/fullchain.pem with key /usr/local/etc/prosody/certs/proxy.localhost/privkey.pem for proxy.localhost\" | wc -l"
|
||||
run bash -c "sudo docker-compose logs $batsContainerName | grep \"Certificates loaded\" | grep \"proxy.localhost:tls\" | wc -l"
|
||||
assert_success
|
||||
assert_output "3"
|
||||
assert_output "1"
|
||||
}
|
||||
|
||||
@test "Should select certificate for pubsub.localhost" {
|
||||
run bash -c "sudo docker-compose logs $batsContainerName | grep \"Selecting certificate /usr/local/etc/prosody/certs/pubsub.localhost/fullchain.pem with key /usr/local/etc/prosody/certs/pubsub.localhost/privkey.pem for pubsub.localhost\" | wc -l"
|
||||
run bash -c "sudo docker-compose logs $batsContainerName | grep \"Certificates loaded\" | grep \"pubsub.localhost:tls\" | wc -l"
|
||||
assert_success
|
||||
assert_output "3"
|
||||
assert_output "1"
|
||||
}
|
||||
|
||||
@test "Should select certificate for upload.localhost" {
|
||||
run bash -c "sudo docker-compose logs $batsContainerName | grep \"Selecting certificate /usr/local/etc/prosody/certs/upload.localhost/fullchain.pem with key /usr/local/etc/prosody/certs/upload.localhost/privkey.pem for upload.localhost\" | wc -l"
|
||||
run bash -c "sudo docker-compose logs $batsContainerName | grep \"Certificates loaded\" | grep \"upload.localhost:tls\" | wc -l"
|
||||
assert_success
|
||||
assert_output "3"
|
||||
assert_output "1"
|
||||
}
|
||||
|
||||
@test "Should log error for user with wrong password" {
|
||||
|
@ -70,12 +69,6 @@ load 'bats/bats-assert/load'
|
|||
assert_output
|
||||
}
|
||||
|
||||
@test "Should activate http" {
|
||||
run bash -c "sudo docker-compose logs $batsContainerName | grep -E \"Activated service 'http' on (\[::\]:5280|\[\*\]:5280), (\[::\]:5280|\[\*\]:5280)\""
|
||||
assert_success
|
||||
assert_output
|
||||
}
|
||||
|
||||
@test "Should activate https" {
|
||||
run bash -c "sudo docker-compose logs $batsContainerName | grep -E \"Activated service 'https' on (\[::\]:5281|\[\*\]:5281), (\[::\]:5281|\[\*\]:5281)\""
|
||||
assert_success
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue