Skip to content

Commit 62d5932

Browse files
committed
test: automate example verification test
rename fix script failure fix script error
1 parent ec9b546 commit 62d5932

File tree

5 files changed

+34
-6
lines changed

5 files changed

+34
-6
lines changed

Makefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,7 @@ create-metrics-svc:
143143

144144
.PHONY: create-example-deployment
145145
create-example-deployment:
146-
kubectl apply -f deploy/example/storageclass-blobfuse.yaml
147-
kubectl apply -f deploy/example/deployment.yaml
148-
kubectl apply -f deploy/example/statefulset.yaml
149-
kubectl apply -f deploy/example/statefulset-nonroot.yaml
146+
./hack/verify-examples.sh
150147

151148
.PHONY: delete-metrics-svc
152149
delete-metrics-svc:

deploy/example/statefulset-nonroot.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
apiVersion: apps/v1
33
kind: StatefulSet
44
metadata:
5-
name: statefulset-blob
5+
name: statefulset-blob-nonroot
66
labels:
77
app: nginx
88
spec:
9-
serviceName: statefulset-blob
9+
serviceName: statefulset-blob-nonroot
1010
replicas: 1
1111
template:
1212
metadata:

hack/verify-examples.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
# Copyright 2020 The Kubernetes Authors.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
set -euo pipefail
17+
18+
echo "begin to create deployment examples ..."
19+
kubectl apply -f deploy/example/storageclass-blobfuse.yaml
20+
kubectl apply -f deploy/example/deployment.yaml
21+
kubectl apply -f deploy/example/statefulset.yaml
22+
kubectl apply -f deploy/example/statefulset-nonroot.yaml
23+
24+
echo "sleep 90s ..."
25+
sleep 90
26+
27+
kubectl get pods --field-selector status.phase=Running | grep deployment-blob
28+
kubectl get pods --field-selector status.phase=Running | grep statefulset-blob-0
29+
kubectl get pods --field-selector status.phase=Running | grep statefulset-blob-nonroot-0
30+
31+
echo "deployment examples running completed."

test/utils/check_driver_pods_restart.sh

100644100755
File mode changed.

test/utils/get_storage_account_secret_name.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)