1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/libnetwork/test/integration/dnet/dnet.bats
Jana Radhakrishnan ea4cdf441e Add simple integration test cases
- Enhance dnet to use codegansta/cli as the frontend
    - Add `container create/rm` commands only in dnet
    - With the above dnet enhancements add more integration tests

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-09-16 09:17:32 -07:00

31 lines
681 B
Bash

#!/usr/bin/env bats
load helpers
@test "Test dnet custom port" {
start_dnet 1 a none null 4567
dnet_cmd 4567 network ls
stop_dnet 1 a
}
@test "Test dnet invalid custom port" {
start_dnet 1 b none null 4567
run dnet_cmd 4568 network ls
echo ${output}
[ "$status" -ne 0 ]
stop_dnet 1 b
}
@test "Test dnet invalid params" {
start_dnet 1 c none null
run dnet_cmd 8080 network ls
echo ${output}
[ "$status" -ne 0 ]
run ./cmd/dnet/dnet -H=unix://var/run/dnet.sock network ls
echo ${output}
[ "$status" -ne 0 ]
run ./cmd/dnet/dnet -H= -l=invalid network ls
echo ${output}
[ "$status" -ne 0 ]
stop_dnet 1 c
}