-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile-e2e
184 lines (160 loc) · 6.53 KB
/
Makefile-e2e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
# vim: set foldmethod=indent foldnestmax=1 foldcolumn=1:
ifneq (,$(wildcard ./Makefile-vars-git-ignored))
include ./Makefile-vars-git-ignored
export
endif
##@ Developer Recipes
.PHONY: install-e2e-tools
install-e2e-tools: ## install e2e related binaries
@echo -e $(_begin)
wget https://dl.k8s.io/$(_E2E_K8S_VERSION)/kubernetes-test-linux-amd64.tar.gz
tar --strip-components=3 -zxf kubernetes-test-linux-amd64.tar.gz \
kubernetes/test/bin/e2e.test kubernetes/test/bin/ginkgo
@echo -e $(_finish)
.PHONY: install-csi-sanity
install-csi-sanity: ## install the upstream e2e sanity test binary
@echo -e $(_begin)
./e2e/csi-sanity/install.sh
@echo -e $(_finish)
.PHONY: e2e-grpc
e2e-grpc: ## run the infinidat developed grpc e2e test
@echo -e $(_begin)
@echo -e kubeconfig here is ${KUBECONFIG}
$(_GOTEST) -v ./e2e/grpc -tags e2e
@echo -e $(_finish)
.PHONY: external-e2e
external-e2e: ## run the upstream e2e sanity tests for a particular suite of tests
@echo -e $(_begin)
export _E2E_NAMESPACE=$(_E2E_NAMESPACE) \
_E2E_POOL=$(_E2E_POOL) \
_E2E_PROTOCOL=$(_E2E_PROTOCOL) \
_E2E_NETWORK_SPACE=$(_E2E_NETWORK_SPACE) \
&& ./e2e/external-e2e/run.sh
@echo -e $(_finish)
.PHONY: e2e-csi-sanity
e2e-csi-sanity: ## run the upstream csi-sanity tests against our gRPC endpoint
@echo -e $(_begin)
export _E2E_IBOX_HOSTNAME=$(_E2E_IBOX_HOSTNAME) \
_E2E_NAMESPACE=$(_E2E_NAMESPACE) \
_E2E_POOL=$(_E2E_POOL) \
_E2E_PROTOCOL=$(_E2E_PROTOCOL) \
_E2E_NETWORK_SPACE=$(_E2E_NETWORK_SPACE) \
_E2E_IBOX_USERNAME=$(_E2E_IBOX_USERNAME) \
_E2E_IBOX_PASSWORD=$(_E2E_IBOX_PASSWORD) \
&& ./e2e/csi-sanity/run.sh
@echo -e $(_finish)
.PHONY: e2e-redhat-sanity
e2e-redhat-sanity: ## run the redhat e2e tests
@echo -e $(_begin)
export _E2E_NAMESPACE=$(_E2E_NAMESPACE) \
_E2E_POOL=$(_E2E_POOL) \
_E2E_PROTOCOL=$(_E2E_PROTOCOL) \
_E2E_NETWORK_SPACE=$(_E2E_NETWORK_SPACE) \
_E2E_OCP_VERSION=$(_E2E_OCP_VERSION) \
&& ./e2e/redhat-e2e/run-container.sh
@echo -e $(_finish)
.PHONY: e2emetrics
e2emetrics: ## test the metrics deployment on openshift
@echo -e $(_begin)
@echo -e kubeconfig here is ${KUBECONFIG}
#_GITLAB_USER=$(_GITLAB_USER) _IMAGE_TAG=$(_IMAGE_TAG) ./e2e/metrics/run.sh
METRICS_IMAGE=git.infinidat.com:4567/$(_GITLAB_USER)/infinidat-csi-driver/infinidat-csi-metrics:$(_IMAGE_TAG) STORAGECLASS=$(_LOCALDIR)/e2e/metrics/storageclass.yaml CONFIGFILE=$(_LOCALDIR)/e2e/metrics/config.yaml $(_GOTEST) -count=1 -v ./e2e/metrics -tags e2e
@echo -e $(_finish)
.PHONY: e2etreeq
e2etreeq: ## run the infinidat developed e2e treeq tests
@echo -e $(_begin)
@echo -e kubeconfig here is ${KUBECONFIG}
$(_GOTEST) -count=1 -v ./e2e/treeq -tags e2e
@echo -e $(_finish)
.PHONY: e2etreeqanno
e2etreeqanno: ## run the infinidat developed e2e treeq tests
@echo -e $(_begin)
@echo -e kubeconfig here is ${KUBECONFIG}
$(_GOTEST) -timeout=20m -count=1 -v ./e2e/treeqanno -tags e2e
@echo -e $(_finish)
.PHONY: e2enfs
e2enfs: ## run the infinidat developed e2e nfs tests
@echo -e $(_begin)
@echo -e kubeconfig here is ${KUBECONFIG}
$(_GOTEST) -timeout=30m -count=1 -v ./e2e/nfs -tags e2e
@echo -e $(_finish)
.PHONY: e2enfsanno
e2enfsanno: ## run the infinidat developed e2e nfs tests
@echo -e $(_begin)
@echo -e kubeconfig here is ${KUBECONFIG}
$(_GOTEST) -timeout=20m -count=1 -v ./e2e/nfsanno -tags e2e
@echo -e $(_finish)
.PHONY: e2eiscsi
e2eiscsi: ## run the infinidat developed e2e iscsi tests
@echo -e $(_begin)
@echo -e kubeconfig here is ${KUBECONFIG}
$(_GOTEST) -timeout=45m -count=1 -v ./e2e/iscsi -tags e2e
@echo -e $(_finish)
.PHONY: e2eiscsireplica
e2eiscsireplica: ## run the infinidat developed e2e iscsi replica tests
@echo -e $(_begin)
@echo -e kubeconfig here is ${KUBECONFIG}
$(_GOTEST) -timeout=45m -count=1 -v ./e2e/iscsi-replica -tags e2e
@echo -e $(_finish)
.PHONY: e2eiscsivolumegroup
e2eiscsivolumegroup: ## VolumeGroupSnapshot test using iscsi volume
@echo -e $(_begin)
@echo -e kubeconfig here is ${KUBECONFIG}
$(_GOTEST) -count=1 -v ./e2e/iscsi-volumegroup -tags e2e
@echo -e $(_finish)
.PHONY: e2eiscsianno
e2eiscsianno: ## run the infinidat developed e2e iscsi tests
@echo -e $(_begin)
@echo -e kubeconfig here is ${KUBECONFIG}
$(_GOTEST) -count=1 -v ./e2e/iscsianno -tags e2e
@echo -e $(_finish)
.PHONY: e2eiscsichap
e2eiscsichap: ## run the infinidat developed e2e iscsi tests
@echo -e $(_begin)
@echo -e kubeconfig here is ${KUBECONFIG}
$(_GOTEST) -count=1 -v ./e2e/iscsichap -tags e2e
@echo -e $(_finish)
.PHONY: e2eiscsimutualchap
e2eiscsimutualchap: ## run the infinidat developed e2e iscsi tests
@echo -e $(_begin)
@echo -e kubeconfig here is ${KUBECONFIG}
$(_GOTEST) -count=1 -v ./e2e/iscsimutualchap -tags e2e
@echo -e $(_finish)
.PHONY: e2efc
e2efc: ## run the infinidat developed e2e fc tests
@echo -e $(_begin)
@echo -e kubeconfig here is ${KUBECONFIG}
$(_GOTEST) -timeout=45m -count=1 -v ./e2e/fc -tags e2e
@echo -e $(_finish)
.PHONY: e2efcstressout
e2efcstressout: ## create a bunch of fc volumes
@echo -e $(_begin)
@echo -e kubeconfig here is ${KUBECONFIG}
$(_GOTEST) -timeout=45m -count=1 -v ./e2e/fc-stress -tags e2e
@echo -e $(_finish)
.PHONY: e2efcanno
e2efcanno: ## run the infinidat developed e2e fc tests
@echo -e $(_begin)
@echo -e kubeconfig here is ${KUBECONFIG}
$(_GOTEST) -count=1 -v ./e2e/fcanno -tags e2e
@echo -e $(_finish)
.PHONY: csitestimage
csitestimage: ## build the e2e test image
@echo -e $(_begin)
go build $(_LOCALDIR)/e2e/csitestimage/csitestimage.go
docker build $(OPTIONAL_DOCKER_BUILD_FLAGS) -t git.infinidat.com:4567/$(_GITLAB_USER)/infinidat-csi-driver/csitestimage:latest -f $(_LOCALDIR)/e2e/csitestimage/Dockerfile .
docker push git.infinidat.com:4567/$(_GITLAB_USER)/infinidat-csi-driver/csitestimage:latest
@echo -e $(_finish)
.PHONY: csitestimageblock
csitestimageblock: ## build the e2e test image for testing block volumes
@echo -e $(_begin)
go build $(_LOCALDIR)/e2e/csitestimageblock/csitestimageblock.go
docker build $(OPTIONAL_DOCKER_BUILD_FLAGS) -t git.infinidat.com:4567/$(_GITLAB_USER)/infinidat-csi-driver/csitestimageblock:latest -f $(_LOCALDIR)/e2e/csitestimageblock/Dockerfile .
docker push git.infinidat.com:4567/$(_GITLAB_USER)/infinidat-csi-driver/csitestimageblock:latest
@echo -e $(_finish)
.PHONY: csitestimageblock-push
csitestimageblock-push:
@echo -e $(_begin)
docker tag git.infinidat.com:4567/$(_GITLAB_USER)/infinidat-csi-driver/csitestimageblock:latest git.infinidat.com:4567/host-opensource/infinidat-csi-driver/csitestimageblock:latest
docker push git.infinidat.com:4567/host-opensource/infinidat-csi-driver/csitestimageblock:latest
@echo -e $(_finish)