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