Commit b6d0ff84 authored by Federico G. Schwindt's avatar Federico G. Schwindt

Merge tests and reshuffle things

parent 46536b1b
varnishtest "Check that we fail to start if any listen address does not work"
varnishtest "Check that we fail to start with erroneous -a/-b arguments"
server s1 {}
varnish v1 -vcl+backend {} -start
varnish v1 -stop
# Duplicate -a arguments
shell -err -expect "have same address" {
varnishd -d -a 127.0.0.1:${v1_port} -a 127.0.0.1:${v1_port} \
-b localhost:80
}
# -a bad protocol specs
shell -err -expect "Too many sub-arguments" \
"varnishd -a 127.0.0.1:80000,PROXY,FOO -d 2>&1"
shell -err -expect "Too many sub-arguments" \
"varnishd -a 127.0.0.1:80000,HTTP/1,FOO -d 2>&1"
# This requires non-local binds to be disabled. If you see this fail
# and are on Linux, ensure /proc/net/ipv4/ip_nonlocal_bind is set to 0.
......
varnishtest "-junix bad subarg handling"
feature root
shell -err -expect "unknown sub-argument" "varnishd -junix,bla=foo -f '' 2>&1"
shell -err -expect "user not found" "varnishd -junix,user=/// -f '' 2>&1"
shell -err -expect "user not found" "varnishd -junix,workuser=/// -f '' 2>&1"
shell -err -expect "group not found" "varnishd -junix,ccgroup=/// -f '' 2>&1"
varnishtest "-junix bad subarg handling"
feature root
shell -err -expect "unknown sub-argument" "varnishd -junix,bla=foo -f '' 2>&1"
shell -err -expect "user not found" "varnishd -junix,user=/// -f '' 2>&1"
shell -err -expect "user not found" "varnishd -junix,workuser=/// -f '' 2>&1"
shell -err -expect "group not found" "varnishd -junix,ccgroup=/// -f '' 2>&1"
feature user_varnish
shell -err -expect "have different login groups" "varnishd -junix,workuser=root -f '' 2>&1"
varnishtest "bad protocol specs for -a"
shell -err -expect "Too many sub-arguments" "varnishd -a 127.0.0.1:80000,PROXY,FOO -d 2>&1"
shell -err -expect "Too many sub-arguments" "varnishd -a 127.0.0.1:80000,HTTP/1,FOO -d 2>&1"
varnishtest "Duplicate -a arguments"
shell -err -match "(have same address)|(already in use)" {
varnishd -d -a 127.0.0.1:38484 -a 127.0.0.1:38484 -b localhost:80
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment