Skip to content

Commit ba82d1f

Browse files
authored
Merge pull request #392 from andyzhangx/pluto
test: add apiVersion deprecation test
2 parents 9eb0ca2 + 8ee09ff commit ba82d1f

File tree

3 files changed

+34
-2
lines changed

3 files changed

+34
-2
lines changed

.github/workflows/pluto.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: apiVersion deprecation test
2+
on:
3+
pull_request: {}
4+
push: {}
5+
6+
jobs:
7+
8+
build:
9+
name: Build
10+
runs-on: ubuntu-latest
11+
steps:
12+
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
16+
- name: Download pluto
17+
uses: FairwindsOps/pluto/github-action@master
18+
19+
- name: Check deploy folder
20+
run: |
21+
pluto detect-files -d deploy
22+
23+
- name: Check example folder
24+
run: |
25+
pluto detect-files -d deploy/example

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ container-windows:
157157
container-all: smb-windows
158158
docker buildx rm container-builder || true
159159
docker buildx create --use --name=container-builder
160+
# enable qemu for arm64 build
161+
# https://github.com/docker/buildx/issues/464#issuecomment-741507760
162+
docker run --privileged --rm tonistiigi/binfmt --uninstall qemu-aarch64
160163
docker run --rm --privileged tonistiigi/binfmt --install all
161164
for arch in $(ALL_ARCH.linux); do \
162165
ARCH=$${arch} $(MAKE) smb; \

test/e2e/testsuites/dynamically_provisioned_delete_pod_tester.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ limitations under the License.
1717
package testsuites
1818

1919
import (
20+
"time"
21+
2022
"github.com/kubernetes-csi/csi-driver-smb/test/e2e/driver"
2123

2224
"github.com/onsi/ginkgo"
@@ -53,7 +55,8 @@ func (t *DynamicallyProvisionedDeletePodTest) Run(client clientset.Interface, na
5355
tDeployment.WaitForPodReady()
5456

5557
if t.PodCheck != nil {
56-
ginkgo.By("checking pod exec")
58+
ginkgo.By("sleep 5s and then check pod exec")
59+
time.Sleep(5 * time.Second)
5760
tDeployment.Exec(t.PodCheck.Cmd, t.PodCheck.ExpectedString)
5861
}
5962

@@ -64,7 +67,8 @@ func (t *DynamicallyProvisionedDeletePodTest) Run(client clientset.Interface, na
6467
tDeployment.WaitForPodReady()
6568

6669
if t.PodCheck != nil {
67-
ginkgo.By("checking pod exec")
70+
ginkgo.By("sleep 5s and then check pod exec after pod restart again")
71+
time.Sleep(5 * time.Second)
6872
// pod will be restarted so expect to see 2 instances of string
6973
tDeployment.Exec(t.PodCheck.Cmd, t.PodCheck.ExpectedString+t.PodCheck.ExpectedString)
7074
}

0 commit comments

Comments
 (0)