2015-09-16 05:26:27 +00:00
|
|
|
#!/usr/bin/env bats
|
|
|
|
|
|
|
|
load helpers
|
|
|
|
|
|
|
|
@test "Test dnet custom port" {
|
2015-09-19 05:42:33 +00:00
|
|
|
start_dnet 1 a 4567
|
2015-09-16 05:26:27 +00:00
|
|
|
dnet_cmd 4567 network ls
|
|
|
|
stop_dnet 1 a
|
|
|
|
}
|
|
|
|
|
|
|
|
@test "Test dnet invalid custom port" {
|
2015-09-19 05:42:33 +00:00
|
|
|
start_dnet 1 b 4567
|
2015-09-16 05:26:27 +00:00
|
|
|
run dnet_cmd 4568 network ls
|
|
|
|
echo ${output}
|
|
|
|
[ "$status" -ne 0 ]
|
|
|
|
stop_dnet 1 b
|
|
|
|
}
|
|
|
|
|
|
|
|
@test "Test dnet invalid params" {
|
2015-09-19 05:42:33 +00:00
|
|
|
start_dnet 1 c
|
2015-09-16 05:26:27 +00:00
|
|
|
run dnet_cmd 8080 network ls
|
|
|
|
echo ${output}
|
|
|
|
[ "$status" -ne 0 ]
|
2015-05-20 19:28:58 +00:00
|
|
|
run ./bin/dnet -H=unix://var/run/dnet.sock network ls
|
2015-09-16 05:26:27 +00:00
|
|
|
echo ${output}
|
|
|
|
[ "$status" -ne 0 ]
|
2015-05-20 19:28:58 +00:00
|
|
|
run ./bin/dnet -H= -l=invalid network ls
|
2015-09-16 05:26:27 +00:00
|
|
|
echo ${output}
|
|
|
|
[ "$status" -ne 0 ]
|
|
|
|
stop_dnet 1 c
|
|
|
|
}
|