2018-08-21 13:04:23 +00:00
|
|
|
varnishtest "Set server FQDN via CLI crash"
|
|
|
|
|
|
|
|
feature ignore_unknown_macro
|
|
|
|
|
2019-10-22 11:06:59 +00:00
|
|
|
# for "set server <srv> fqdn"
|
2019-03-29 14:07:24 +00:00
|
|
|
#REGTEST_TYPE=bug
|
|
|
|
|
2018-08-21 13:04:23 +00:00
|
|
|
# Do nothing. Is there only to create s1_* macros
|
|
|
|
server s1 {
|
|
|
|
} -start
|
|
|
|
|
|
|
|
haproxy h1 -conf {
|
|
|
|
defaults
|
|
|
|
mode http
|
2021-11-18 16:46:22 +00:00
|
|
|
timeout connect "${HAPROXY_TEST_TIMEOUT-5s}"
|
|
|
|
timeout client "${HAPROXY_TEST_TIMEOUT-5s}"
|
|
|
|
timeout server "${HAPROXY_TEST_TIMEOUT-5s}"
|
2018-08-21 13:04:23 +00:00
|
|
|
|
|
|
|
frontend myfrontend
|
|
|
|
bind "fd@${my_fe}"
|
|
|
|
default_backend test
|
|
|
|
|
|
|
|
backend test
|
|
|
|
server www1 ${s1_addr}:${s1_port}
|
|
|
|
} -start
|
|
|
|
|
2023-04-30 00:32:39 +00:00
|
|
|
haproxy h2 -conf {
|
|
|
|
defaults
|
|
|
|
mode http
|
|
|
|
timeout connect "${HAPROXY_TEST_TIMEOUT-5s}"
|
|
|
|
timeout client "${HAPROXY_TEST_TIMEOUT-5s}"
|
|
|
|
timeout server "${HAPROXY_TEST_TIMEOUT-5s}"
|
|
|
|
|
|
|
|
resolvers systemdns
|
|
|
|
parse-resolv-conf
|
|
|
|
|
|
|
|
frontend myfrontend
|
|
|
|
bind "fd@${my_fe}"
|
|
|
|
default_backend test
|
|
|
|
|
|
|
|
backend test
|
|
|
|
server www1 ${s1_addr}:${s1_port} resolvers systemdns resolve-prefer ipv4
|
|
|
|
} -start
|
|
|
|
|
2018-08-21 13:04:23 +00:00
|
|
|
haproxy h1 -cli {
|
|
|
|
send "set server test/www1 fqdn foo.fqdn"
|
2021-06-15 10:01:29 +00:00
|
|
|
expect ~ "set server <b>/<s> fqdn failed because no resolution is configured."
|
2018-08-21 13:04:23 +00:00
|
|
|
send "show servers state test"
|
|
|
|
expect ~ "test 1 www1 ${s1_addr} .* - ${s1_port}"
|
|
|
|
} -wait
|
2023-04-30 00:32:39 +00:00
|
|
|
|
|
|
|
haproxy h2 -cli {
|
|
|
|
send "set server test/www1 fqdn localhost"
|
|
|
|
expect ~ "test/www1 changed its FQDN from \\(null\\) to localhost"
|
|
|
|
send "show servers state test"
|
|
|
|
expect ~ "test 1 www1 127.0.0.1 .* localhost"
|
|
|
|
} -wait
|