vtest	"trivial run of vinyladm in pass mode"

server s1 {
	rxreq
	txresp
} -start

vinyl v1 -vcl+backend {} -start

client c1 {
	txreq
	rxresp
} -run

vinyl v1 -vsl_catchup

process p1 -log {vinyladm -t 12 -p -n ${v1_name}} -start

# expect a full status line in pass mode (no banner)
process p1 -write "ping\r"
process p1 -expect-text 2 1 "200 19      "
process p1 -expect-text 3 1 PONG

process p1 -write "vcl.list\r"
process p1 -expect-text 0 0 "auto   warm"

process p1 -write "vcl.show vcl1\r"
process p1 -expect-text 0 0 "backend s1"

process p1 -screen_dump -write "\x04" -wait

process p1 -log {vinyladm -t foobar 2>&1} -expect-exit 2 -run
process p1 -expect-text 0 0 "-t: Invalid argument:"

process p1 -log {vinyladm -Q 2>&1} -expect-exit 1 -run
process p1 -expect-text 0 0 "Usage: vinyladm"

process p2 -log {vinyladm -h 2>&1} -expect-exit 0 -run
process p2 -expect-text 0 0 "Usage: vinyladm"
