Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
CWSpear committed Nov 3, 2016
1 parent 4f7e0ee commit 674ca29
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
*_test.go
.idea
bin
init
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 &

Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down

0 comments on commit 674ca29

Please sign in to comment.