mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
add test for wildcard domain. don't match domain substring. closes #1614
This commit is contained in:
@@ -65,7 +65,7 @@ case "$1" in
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $(grep --fixed-strings "$3" "$DOKKU_ROOT/$APP/VHOST" > /dev/null 2>&1; echo $?) -eq 0 ]]; then
|
||||
if [[ $(egrep -w "^{$3}$" "$DOKKU_ROOT/$APP/VHOST" > /dev/null 2>&1; echo $?) -eq 0 ]]; then
|
||||
echo "$3 is already defined for $APP"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -46,6 +46,17 @@ teardown() {
|
||||
refute_line "test.app.dokku.me"
|
||||
}
|
||||
|
||||
@test "(domains) domains:remove (wildcard domain)" {
|
||||
run dokku domains:add $TEST_APP *.dokku.me
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
run dokku domains:remove $TEST_APP *.dokku.me
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
refute_line "*.dokku.me"
|
||||
}
|
||||
|
||||
@test "(domains) domains:clear" {
|
||||
run dokku domains:add $TEST_APP test.app.dokku.me
|
||||
echo "output: "$output
|
||||
|
||||
Reference in New Issue
Block a user