Skip to content

Commit 7bfaf22

Browse files
authored
Merge pull request #244 from andyzhangx/rename-test-image
test: switch to use mcr nginx image
2 parents 421b562 + e622347 commit 7bfaf22

File tree

7 files changed

+25
-4
lines changed

7 files changed

+25
-4
lines changed

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,3 +133,9 @@ clean:
133133
.PHONY: create-metrics-svc
134134
create-metrics-svc:
135135
kubectl create -f deploy/example/metrics/csi-blob-controller-svc.yaml
136+
137+
.PHONY: create-example-deployment
138+
create-example-deployment:
139+
kubectl apply -f deploy/example/storageclass-blobfuse.yaml
140+
kubectl apply -f deploy/example/deployment.yaml
141+
kubectl apply -f deploy/example/statefulset.yaml

deploy/example/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ spec:
3232
"kubernetes.io/os": linux
3333
containers:
3434
- name: deployment-blob
35-
image: nginx
35+
image: mcr.microsoft.com/oss/nginx/nginx:1.17.3-alpine
3636
command:
3737
- "/bin/sh"
3838
- "-c"

deploy/example/nginx-pod-blob.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ spec:
77
nodeSelector:
88
"kubernetes.io/os": linux
99
containers:
10-
- image: nginx
10+
- image: mcr.microsoft.com/oss/nginx/nginx:1.17.3-alpine
1111
name: nginx-blob
1212
command:
1313
- "/bin/sh"

deploy/example/statefulset.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spec:
1717
"kubernetes.io/os": linux
1818
containers:
1919
- name: statefulset-blob
20-
image: nginx
20+
image: mcr.microsoft.com/oss/nginx/nginx:1.17.3-alpine
2121
command:
2222
- "/bin/sh"
2323
- "-c"

hack/verify-golint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ set -euo pipefail
1818

1919
if [[ -z "$(command -v golangci-lint)" ]]; then
2020
echo "Cannot find golangci-lint. Installing golangci-lint..."
21-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.24.0
21+
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.31.0
2222
fi
2323

2424
golangci-lint run --no-config --enable=golint --disable=typecheck --deadline=10m

test/e2e/suite_test.go

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

3132
"github.com/onsi/ginkgo"
3233
"github.com/onsi/ginkgo/reporters"
@@ -111,6 +112,16 @@ var _ = ginkgo.BeforeSuite(func() {
111112

112113
var _ = ginkgo.AfterSuite(func() {
113114
if testutil.IsRunningInProw() {
115+
createExampleDeployment := testCmd{
116+
command: "make",
117+
args: []string{"create-example-deployment"},
118+
startLog: "create example deployments",
119+
endLog: "example deployments created",
120+
}
121+
execTestCmd([]testCmd{createExampleDeployment})
122+
// sleep 120s waiting for deployment running complete
123+
time.Sleep(120 * time.Second)
124+
114125
blobLog := testCmd{
115126
command: "bash",
116127
args: []string{"test/utils/blob_log.sh"},

test/utils/blob_log.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ echo "print out all nodes status ..."
2323
kubectl get nodes -o wide
2424
echo "======================================================================================"
2525

26+
echo "print out all default namespace pods status ..."
27+
kubectl get pods -n default -o wide
28+
echo "======================================================================================"
29+
2630
echo "print out all $NS namespace pods status ..."
2731
kubectl get pods -n${NS}
2832
echo "======================================================================================"

0 commit comments

Comments
 (0)