TEST: wildcards-hosts.bats - add a test which uses regexp end-of-string
This commit is contained in:
parent
a3c6a272f1
commit
d8658bd8d9
1 changed files with 16 additions and 2 deletions
|
@ -43,8 +43,8 @@ function setup {
|
|||
|
||||
@test "[$TEST_FILE] VIRTUAL_HOST=~^foo\.bar\..*\.bats" {
|
||||
# WHEN
|
||||
prepare_web_container bats-wildcard-hosts-2 80 -e VIRTUAL_HOST=~^foo\.bar\..*\.bats
|
||||
dockergen_wait_for_event $SUT_CONTAINER start bats-wildcard-hosts-2
|
||||
prepare_web_container bats-wildcard-hosts-3 80 -e VIRTUAL_HOST=~^foo\.bar\..*\.bats
|
||||
dockergen_wait_for_event $SUT_CONTAINER start bats-wildcard-hosts-3
|
||||
sleep 1
|
||||
|
||||
# THEN
|
||||
|
@ -55,6 +55,20 @@ function setup {
|
|||
|
||||
}
|
||||
|
||||
@test "[$TEST_FILE] VIRTUAL_HOST=~^foo\.bar\..*\.bats$" {
|
||||
# WHEN
|
||||
prepare_web_container bats-wildcard-hosts-4 80 -e VIRTUAL_HOST=~^foo\.bar\..*\.bats$
|
||||
dockergen_wait_for_event $SUT_CONTAINER start bats-wildcard-hosts-4
|
||||
sleep 1
|
||||
|
||||
# THEN
|
||||
assert_200 foo.bar.whatever.bats
|
||||
assert_200 foo.bar.why.not.bats
|
||||
assert_503 foo.bar.why.not.bats-to-infinity-and-beyond
|
||||
assert_503 unexpected.host.bats
|
||||
|
||||
}
|
||||
|
||||
@test "[$TEST_FILE] stop all bats containers" {
|
||||
stop_bats_containers
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue