mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-03-09 12:58:07 +00:00
REGTESTS: add minimal CLI "add map" tests
The map_redirect test already tests for "show map", "del map" and "clear map" but doesn't have any "add map" command. Let's add some trivial ones involving one regular entry and two other ones added as payload, checking they are properly returned.
This commit is contained in:
parent
996190a70d
commit
deee369cfa
@ -161,6 +161,17 @@ haproxy h1 -cli {
|
||||
send "show map ${testdir}/map_redirect.map"
|
||||
expect ~ "^\\n"
|
||||
|
||||
# add map ${testdir}/map_redirect.map
|
||||
send "add map ${testdir}/map_redirect.map site1_key site1_value"
|
||||
expect ~ "^\\n"
|
||||
|
||||
# add 2 more entries as payload
|
||||
send "add map ${testdir}/map_redirect.map <<\nsite2_key site2_value\nsite3_key site3_value\n"
|
||||
expect ~ "^\\n"
|
||||
|
||||
send "show map ${testdir}/map_redirect.map"
|
||||
expect ~ "^0x[a-f0-9]+ site1_key site1_value\\n0x[a-f0-9]+ site2_key site2_value\\n0x[a-f0-9]+ site3_key site3_value\\n$"
|
||||
|
||||
# del map ${testdir}/map_redirect-be.map test1.example.{com,invalid}
|
||||
send "del map ${testdir}/map_redirect-be.map test1.example.com"
|
||||
expect ~ "^\\n"
|
||||
|
Loading…
Reference in New Issue
Block a user