Update travis to test specific packages

Add another netlink test and remove the -v from the dockerfile test
output
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
This commit is contained in:
Michael Crosby 2014-07-23 11:34:07 -07:00
parent 39ce7cca29
commit 00047d5339
3 changed files with 21 additions and 2 deletions

View File

@ -31,4 +31,4 @@ script:
- if [ "$TRAVIS_GLOBAL_WTF" ]; then bash "$DOCKER_PATH/hack/make/validate-dco"; fi
- if [ "$TRAVIS_GLOBAL_WTF" ]; then bash "$DOCKER_PATH/hack/make/validate-gofmt"; fi
- if [ -z "$TRAVIS_GLOBAL_WTF" ]; then go build -v ./...; fi
- if [ -z "$TRAVIS_GLOBAL_WTF" -a "$GOARCH" != 'arm' ]; then go test -v ./...; fi
- if [ -z "$TRAVIS_GLOBAL_WTF" -a "$GOARCH" != 'arm' ]; then go test -v . ./selinux ./cgroups ./cgroups/fs ./security/capabilities ./syncpipe; fi

View File

@ -7,4 +7,4 @@ ADD . /go/src/github.com/docker/libcontainer
WORKDIR /go/src/github.com/docker/libcontainer
RUN go get -d ./... && go install ./...
CMD ["go", "test", "-v", "-cover", "./..."]
CMD ["go", "test", "-cover", "./..."]

View File

@ -26,3 +26,22 @@ func TestCreateBridgeWithMac(t *testing.T) {
t.Fatal("expected error getting interface because bridge was deleted")
}
}
func TestCreateVethPair(t *testing.T) {
var (
name1 = "veth1"
name2 = "veth2"
)
if err := NetworkCreateVethPair(name1, name2); err != nil {
t.Fatal(err)
}
if _, err := net.InterfaceByName(name1); err != nil {
t.Fatal(err)
}
if _, err := net.InterfaceByName(name2); err != nil {
t.Fatal(err)
}
}