Skip to content

Commit 7974a32

Browse files
authored
Merge pull request #322 from andyzhangx/refactor-verify-examples-test
test: refactor example verification test
2 parents 1296f78 + 6aa6e04 commit 7974a32

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,6 @@ clean:
141141
create-metrics-svc:
142142
kubectl create -f deploy/example/metrics/csi-blob-controller-svc.yaml
143143

144-
.PHONY: create-example-deployment
145-
create-example-deployment:
146-
./hack/verify-examples.sh
147-
148144
.PHONY: delete-metrics-svc
149145
delete-metrics-svc:
150146
kubectl delete -f deploy/example/metrics/csi-blob-controller-svc.yaml --ignore-not-found

hack/verify-examples.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ kubectl apply -f deploy/example/deployment.yaml
2121
kubectl apply -f deploy/example/statefulset.yaml
2222
kubectl apply -f deploy/example/statefulset-nonroot.yaml
2323

24-
echo "sleep 90s ..."
25-
sleep 90
24+
echo "sleep 60s ..."
25+
sleep 60
2626

2727
kubectl get pods --field-selector status.phase=Running | grep deployment-blob
2828
kubectl get pods --field-selector status.phase=Running | grep statefulset-blob-0

test/e2e/suite_test.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import (
2727
"path/filepath"
2828
"strings"
2929
"testing"
30-
"time"
3130

3231
"github.com/onsi/ginkgo"
3332
"github.com/onsi/ginkgo/reporters"
@@ -118,14 +117,12 @@ var _ = ginkgo.BeforeSuite(func() {
118117

119118
var _ = ginkgo.AfterSuite(func() {
120119
createExampleDeployment := testCmd{
121-
command: "make",
122-
args: []string{"create-example-deployment"},
120+
command: "bash",
121+
args: []string{"hack/verify-examples.sh"},
123122
startLog: "create example deployments",
124123
endLog: "example deployments created",
125124
}
126125
execTestCmd([]testCmd{createExampleDeployment})
127-
// sleep 120s waiting for deployment running complete
128-
time.Sleep(120 * time.Second)
129126

130127
blobLog := testCmd{
131128
command: "bash",

0 commit comments

Comments
 (0)