Commit cc7ba6f 1 parent 57aeb5f commit cc7ba6f Copy full SHA for cc7ba6f
File tree 5 files changed +59
-0
lines changed
5 files changed +59
-0
lines changed Original file line number Diff line number Diff line change 9
9
10
10
# Output of the go coverage tool, specifically when used with LiteIDE
11
11
* .out
12
+ bin /mock
12
13
cmd /csi-sanity /csi-sanity
Original file line number Diff line number Diff line change 7
7
- go vet $(go list ./... | grep -v vendor)
8
8
- go test $(go list ./... | grep -v vendor | grep -v "cmd/csi-sanity")
9
9
- ./hack/e2e.sh
10
+ after_success :
11
+ - if [ "${TRAVIS_BRANCH}" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
12
+ docker login -u "${DOCKER_USERNAME}" -p "${DOCKER_PASSWORD}" quay.io;
13
+ make push;
14
+ fi
Original file line number Diff line number Diff line change
1
+ FROM alpine
2
+ LABEL maintainers="Kubernetes Authors"
3
+ LABEL description="CSI Mock Driver"
4
+
5
+ COPY ./bin/mock mock
6
+ ENTRYPOINT ["/mock"]
Original file line number Diff line number Diff line change
1
+ # Copyright 2018 The Kubernetes Authors.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ IMAGE_NAME = quay.io/k8scsi/mock-driver
16
+ IMAGE_VERSION = canary
17
+
18
+ ifdef V
19
+ TESTARGS = -v -args -alsologtostderr -v 5
20
+ else
21
+ TESTARGS =
22
+ endif
23
+
24
+ all : mock
25
+
26
+ mock :
27
+ mkdir -p bin
28
+ CGO_ENABLED=0 GOOS=linux go build -a -ldflags ' -extldflags "-static"' -o ./bin/mock ./mock/main.go
29
+
30
+ clean :
31
+ rm -rf bin
32
+
33
+ container : mock
34
+ docker build -f Dockerfile.mock -t $(IMAGE_NAME ) :$(IMAGE_VERSION ) .
35
+
36
+ push : container
37
+ docker push $(IMAGE_NAME ) :$(IMAGE_VERSION )
Original file line number Diff line number Diff line change 1
1
[ ![ Build Status] ( https://travis-ci.org/kubernetes-csi/csi-test.svg?branch=master )] ( https://travis-ci.org/kubernetes-csi/csi-test )
2
+ [ ![ Docker Repository on Quay] (https://quay.io/repository/k8scsi/mock-driver/status "Docker Repository on
3
+ Quay")] ( https://quay.io/repository/k8scsi/mock-driver )
4
+
2
5
# csi-test
3
6
csi-test houses packages and libraries to help test CSI client and plugins.
4
7
@@ -7,6 +10,13 @@ CO developers can use this framework to create drivers based on the
7
10
[ Golang mock] ( https://github.com/golang/mock ) framework. Please see
8
11
[ co_test.go] ( test/co_test.go ) for an example.
9
12
13
+ ### Mock driver for testing
14
+ We also provide a container called ` quay.io/k8scsi/mock-driver:canary ` which can be used as an in-memory mock driver.
15
+ It follows the same release cycle as other containers, so the latest release is ` quay.io/k8scsi/mock-driver:v0.2.0 ` .
16
+
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
+
10
20
## For CSI Driver Tests
11
21
To test drivers please take a look at [ pkg/sanity] ( https://github.com/kubernetes-csi/csi-test/tree/master/pkg/sanity ) .
12
22
This package and [ csi-sanity] ( https://github.com/kubernetes-csi/csi-test/tree/master/cmd/csi-sanity ) are meant to test
You can’t perform that action at this time.
0 commit comments