Skip to content

Commit 3f1ac79

Browse files
authored
Merge pull request #351 from pohly/remove-mock-driver
remove obsolete mock driver
2 parents 1f60fc5 + a4185b3 commit 3f1ac79

File tree

174 files changed

+39
-51818
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

174 files changed

+39
-51818
lines changed

Makefile

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,41 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# This repository builds two commands, mock-driver and csi-sanity,
16-
# but csi-sanity has its own build rules and only mock-driver gets
17-
# published as a container image.
18-
CMDS=mock-driver
15+
# This repository builds one command, csi-sanity, but it has its own build
16+
# rules no image to be published.
17+
CMDS=
1918
all: build build-sanity
2019

2120
include release-tools/build.make
2221

2322
# We have to exclude generic testing of the csi-sanity command because
2423
# the test binary only works in combination with a CSI driver.
25-
# Instead we test with the special ./hack/e2e.sh.
24+
# Instead we test with the special ./hack/e2e.sh and the
25+
# csi-driver-host-path that we build from source.
2626
TEST_GO_FILTER_CMD+=| grep -v /cmd/csi-sanity
2727
.PHONY: test-sanity
2828
test: test-sanity
29-
test-sanity:
29+
test-sanity: bin/hostpathplugin
3030
@ echo; echo "### $@:"
31-
./hack/e2e.sh
31+
if [ $$(id -u) = 0 ]; then \
32+
./hack/e2e.sh; \
33+
else \
34+
sudo ./hack/e2e.sh; \
35+
fi
3236

3337
build-sanity:
3438
$(MAKE) -C cmd/csi-sanity all
39+
40+
41+
TEST_HOSTPATH_VERSION=v1.7.3
42+
TEST_HOSTPATH_SOURCE=bin/hostpath-source
43+
TEST_HOSTPATH_REPO=https://github.com/kubernetes-csi/csi-driver-host-path.git
44+
bin/hostpathplugin:
45+
mkdir -p $(@D)
46+
if ! [ -d $(TEST_HOSTPATH_SOURCE) ]; then \
47+
mkdir -p $(dir $(TEST_HOSTPATH_SOURCE)) && \
48+
git clone $(TEST_HOSTPATH_REPO) $(TEST_HOSTPATH_SOURCE); \
49+
fi
50+
cd $(TEST_HOSTPATH_SOURCE) && git checkout $(TEST_HOSTPATH_VERSION)
51+
make -C $(TEST_HOSTPATH_SOURCE) build
52+
ln -fs $(abspath $(TEST_HOSTPATH_SOURCE))/bin/hostpathplugin $@

README.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
[![Build Status](https://k8s-testgrid.appspot.com/sig-storage-csi-other#pull-kubernetes-csi-csi-test)](https://k8s-testgrid.appspot.com/sig-storage-csi-other#pull-kubernetes-csi-csi-test)
2-
[![Docker Repository on gcr](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/US/sig-storage/mock-driver)](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/US/sig-storage/mock-driver)
32

43
# csi-test
54

@@ -11,17 +10,6 @@ CO developers can use this framework to create drivers based on the
1110
[Golang mock](https://github.com/golang/mock) framework. Please see
1211
[co_test.go](test/co_test.go) for an example.
1312

14-
### Mock driver for testing
15-
16-
We also provide a container called `k8s.gcr.io/sig-storage/mock-driver` which can be used as an in-memory mock driver.
17-
You will need to setup the environment variable `CSI_ENDPOINT` for the mock driver to know where to create the unix
18-
domain socket.
19-
20-
There is an [example](https://github.com/kubernetes-csi/csi-test/tree/master/mock/example) deployment
21-
for experiment with the mock csi driver.
22-
23-
For more complicated test-cases see [how to use JavaScript hooks from the driver](hooks-howto.md).
24-
2513
## For CSI Driver Tests
2614

2715
To test drivers please take a look at [pkg/sanity](https://github.com/kubernetes-csi/csi-test/tree/master/pkg/sanity).

cmd/csi-sanity/Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# This repository builds two commands, mock-driver and csi-sanity,
16-
# but csi-sanity has its own build rules and only mock-driver gets
17-
# published as a container image.
18-
1915
APP_NAME := csi-sanity
2016
VER :=$(shell git describe)
2117
RELEASEVER := $(shell git describe --abbrev=0)

cmd/mock-driver/Dockerfile

Lines changed: 0 additions & 24 deletions
This file was deleted.

cmd/mock-driver/main.go

Lines changed: 0 additions & 227 deletions
This file was deleted.

go.mod

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,12 @@ require (
1111
github.com/nxadm/tail v1.4.5 // indirect
1212
github.com/onsi/ginkgo v1.14.2
1313
github.com/onsi/gomega v1.10.4
14-
github.com/robertkrimen/otto v0.0.0-20200922221731-ef014fd054ac
15-
github.com/sirupsen/logrus v1.7.0
16-
golang.org/x/net v0.0.0-20201209123823-ac852fbbde11
14+
golang.org/x/net v0.0.0-20201209123823-ac852fbbde11 // indirect
1715
golang.org/x/sys v0.0.0-20201207223542-d4d67f95c62d // indirect
1816
golang.org/x/text v0.3.4 // indirect
1917
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
2018
google.golang.org/genproto v0.0.0-20201209185603-f92720507ed4 // indirect
2119
google.golang.org/grpc v1.34.0
22-
gopkg.in/sourcemap.v1 v1.0.5 // indirect
2320
gopkg.in/yaml.v2 v2.4.0
2421
k8s.io/klog/v2 v2.4.0
2522
)

go.sum

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnht
66
github.com/container-storage-interface/spec v1.5.0 h1:lvKxe3uLgqQeVQcrnL2CPQKISoKjTJxojEs9cBk+HXo=
77
github.com/container-storage-interface/spec v1.5.0/go.mod h1:8K96oQNkJ7pFcC2R9Z1ynGGBB1I93kcS6PGg3SsOk8s=
88
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
9-
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
10-
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
119
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
1210
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
1311
github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po=
@@ -53,16 +51,9 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J
5351
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
5452
github.com/onsi/gomega v1.10.4 h1:NiTx7EEvBzu9sFOD1zORteLSt3o8gnlvZZwSE9TnY9U=
5553
github.com/onsi/gomega v1.10.4/go.mod h1:g/HbgYopi++010VEqkFgJHKC09uJiW9UkXvMUuKHUCQ=
56-
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
5754
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
5855
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
59-
github.com/robertkrimen/otto v0.0.0-20200922221731-ef014fd054ac h1:kYPjbEN6YPYWWHI6ky1J813KzIq/8+Wg4TO4xU7A/KU=
60-
github.com/robertkrimen/otto v0.0.0-20200922221731-ef014fd054ac/go.mod h1:xvqspoSXJTIpemEonrMDFq6XzwHYYgToXWj5eRX1OtY=
61-
github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM=
62-
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
6356
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
64-
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
65-
github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
6657
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
6758
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
6859
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
@@ -90,7 +81,6 @@ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5h
9081
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
9182
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
9283
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
93-
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
9484
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
9585
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
9686
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -141,8 +131,6 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba
141131
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
142132
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
143133
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
144-
gopkg.in/sourcemap.v1 v1.0.5 h1:inv58fC9f9J3TK2Y2R1NPntXEn3/wjWHkonhIUODNTI=
145-
gopkg.in/sourcemap.v1 v1.0.5/go.mod h1:2RlvNNSMglmRrcvhfuzp4hQHwOtjxlbjX7UPY/GXb78=
146134
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
147135
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
148136
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=

0 commit comments

Comments
 (0)