Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ script:
- go fmt $(go list ./... | grep -v vendor) | wc -l | grep 0
- go vet $(go list ./... | grep -v vendor)
- go test $(go list ./... | grep -v vendor | grep -v "cmd/csi-sanity")
- ./hack/e2e.sh
3 changes: 3 additions & 0 deletions cmd/csi-sanity/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ all: $(APP_NAME)
$(APP_NAME): Makefile sanity_test.go
go test $(LDFLAGS) -c -o $(APP_NAME)

install: $(APP_NAME)
cp $(APP_NAME) $(GOPATH)/bin

clean:
rm -f csi-sanity
rm -rf $(DIR)/dist
Expand Down
27 changes: 27 additions & 0 deletions hack/e2e.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

CSI_ENDPOINTS="tcp://127.0.0.1:9998"
#CSI_ENDPOINTS="$CSI_ENDPOINTS /tmp/csi.sock"
#CSI_ENDPOINTS="$CSI_ENDPOINTS unix:///tmp/csi.sock"

if [ ! -x $GOPATH/bin/mock ] ; then
go get -u github.com/thecodeteam/gocsi/mock
fi

cd cmd/csi-sanity
make clean install || exit 1
cd ../..

for endpoint in $CSI_ENDPOINTS ; do
CSI_ENDPOINT=$endpoint mock &
pid=$!

csi-sanity --csi.endpoint=$endpoint ; ret=$?
kill -9 $pid

if [ $ret -ne 0 ] ; then
exit $ret
fi
done

exit 0
82 changes: 0 additions & 82 deletions pkg/sanity/sanity_test.go

This file was deleted.