From 674ca2984a68460b5a4866f71e30d4cc9a347d56 Mon Sep 17 00:00:00 2001 From: Cameron Spear Date: Thu, 3 Nov 2016 13:15:32 -0700 Subject: [PATCH] Fix tests --- .dockerignore | 1 - .travis.yml | 2 +- Makefile | 6 +++++- driver_test.go | 4 ++-- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.dockerignore b/.dockerignore index f4e307c..4e4b80f 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,4 +1,3 @@ -*_test.go .idea bin init diff --git a/.travis.yml b/.travis.yml index 9d98fb7..4f32c76 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ install: before_script: - docker version - - GO15VENDOREXPERIMENT=1 make binary-linux-amd64 + - make binary-linux-amd64 - chmod +x bin/linux/amd64/local-persist - sudo ./bin/linux/amd64/local-persist & diff --git a/Makefile b/Makefile index a14f29c..4c9ae01 100644 --- a/Makefile +++ b/Makefile @@ -4,8 +4,10 @@ BIN_NAME=local-persist coverage: GO_ENV=test go test -v -coverprofile=coverage.out ./... && sed -i '' 's|'_$(PWD)'|.|g' coverage.out && go tool cover -html=coverage.out +test: export GO15VENDOREXPERIMENT=1 +test: export GO_ENV=test test: - GO_ENV=test go test -v ./... + go test -v . run: sudo -E go run main.go driver.go @@ -21,10 +23,12 @@ release: ./scripts/release.sh # build for current architecture +binary: export GO15VENDOREXPERIMENT=1 binary: go build -o bin/$(BIN_NAME) -v # build all the binaries +binaries: export GO15VENDOREXPERIMENT=1 binaries: clean-bin binary-linux-amd64 # binary-linux-386 binary-linux-arm binary-freebsd-amd64 binary-freebsd-386 clean-bin: diff --git a/driver_test.go b/driver_test.go index cc53e0f..33b3dc6 100644 --- a/driver_test.go +++ b/driver_test.go @@ -82,8 +82,8 @@ func TestMountUnmountPath(t *testing.T) { // mount, mount and path should have same output (they all use Path under the hood) pathRes := driver.Path(volume.Request{ Name: defaultTestName }) - mountRes := driver.Mount(volume.Request{ Name: defaultTestName }) - unmountRes := driver.Unmount(volume.Request{ Name: defaultTestName }) + mountRes := driver.Mount(volume.MountRequest{ Name: defaultTestName }) + unmountRes := driver.Unmount(volume.UnmountRequest{ Name: defaultTestName }) if !(pathRes.Mountpoint == mountRes.Mountpoint && mountRes.Mountpoint == unmountRes.Mountpoint &&