Frédéric Lécaille | 5afb3cf | 2018-08-21 15:04:23 +0200 | [diff] [blame] | 1 | varnishtest "Set server FQDN via CLI crash" |
| 2 | |
| 3 | feature ignore_unknown_macro |
| 4 | |
Willy Tarreau | 04068a1 | 2019-10-22 13:06:59 +0200 | [diff] [blame] | 5 | # for "set server <srv> fqdn" |
| 6 | #REQUIRE_VERSION=1.8 |
Frédéric Lécaille | dc1a3bd | 2019-03-29 15:07:24 +0100 | [diff] [blame] | 7 | #REGTEST_TYPE=bug |
| 8 | |
Frédéric Lécaille | 5afb3cf | 2018-08-21 15:04:23 +0200 | [diff] [blame] | 9 | # Do nothing. Is there only to create s1_* macros |
| 10 | server s1 { |
| 11 | } -start |
| 12 | |
| 13 | haproxy h1 -conf { |
| 14 | defaults |
| 15 | mode http |
Christopher Faulet | 8f16148 | 2018-12-19 11:49:39 +0100 | [diff] [blame] | 16 | ${no-htx} option http-use-htx |
Frédéric Lécaille | 5afb3cf | 2018-08-21 15:04:23 +0200 | [diff] [blame] | 17 | timeout connect 1s |
| 18 | timeout client 1s |
| 19 | timeout server 1s |
| 20 | |
| 21 | frontend myfrontend |
| 22 | bind "fd@${my_fe}" |
| 23 | default_backend test |
| 24 | |
| 25 | backend test |
| 26 | server www1 ${s1_addr}:${s1_port} |
| 27 | } -start |
| 28 | |
| 29 | haproxy h1 -cli { |
| 30 | send "set server test/www1 fqdn foo.fqdn" |
Christopher Faulet | 0139e0a | 2021-06-15 12:01:29 +0200 | [diff] [blame] | 31 | expect ~ "set server <b>/<s> fqdn failed because no resolution is configured." |
Frédéric Lécaille | 5afb3cf | 2018-08-21 15:04:23 +0200 | [diff] [blame] | 32 | send "show servers state test" |
| 33 | expect ~ "test 1 www1 ${s1_addr} .* - ${s1_port}" |
| 34 | } -wait |