Skip to content

Commit 16f0972

Browse files
committed
test: change csi.sock to fix random e2e test failure
1 parent ef26cdd commit 16f0972

File tree

3 files changed

+30
-2
lines changed

3 files changed

+30
-2
lines changed

deploy/uninstall-driver.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
3+
# Copyright 2019 The Kubernetes Authors.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
set -uo pipefail
18+
19+
echo 'Uninstalling Blobfuse CSI driver...'
20+
kubectl delete -f deploy/crd-csi-driver-registry.yaml
21+
kubectl delete -f deploy/crd-csi-node-info.yaml
22+
kubectl delete -f deploy/rbac-csi-blobfuse-controller.yaml
23+
kubectl delete -f deploy/csi-blobfuse-controller.yaml
24+
kubectl delete -f deploy/csi-blobfuse-node.yaml
25+
echo 'Blobfuse CSI driver uninstalled'

test/e2e/dynamic_provisioning.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ import (
2424
"github.com/csi-driver/blobfuse-csi-driver/test/e2e/driver"
2525
"github.com/csi-driver/blobfuse-csi-driver/test/e2e/testsuites"
2626
. "github.com/onsi/ginkgo"
27+
"github.com/pborman/uuid"
28+
2729
v1 "k8s.io/api/core/v1"
2830
clientset "k8s.io/client-go/kubernetes"
2931
"k8s.io/kubernetes/test/e2e/framework"
@@ -40,7 +42,7 @@ var _ = Describe("Dynamic Provisioning", func() {
4042

4143
nodeid := os.Getenv("nodeid")
4244
blobfuseDriver := blobfuse.NewDriver(nodeid)
43-
endpoint := "unix:///tmp/csi.sock"
45+
endpoint := fmt.Sprintf("unix:///tmp/csi-%s.sock", uuid.NewUUID().String())
4446

4547
go func() {
4648
blobfuseDriver.Run(endpoint)

test/e2e/pre_provisioning.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import (
2626
"github.com/csi-driver/blobfuse-csi-driver/test/e2e/driver"
2727
"github.com/csi-driver/blobfuse-csi-driver/test/e2e/testsuites"
2828
. "github.com/onsi/ginkgo"
29+
"github.com/pborman/uuid"
2930

3031
v1 "k8s.io/api/core/v1"
3132
clientset "k8s.io/client-go/kubernetes"
@@ -53,7 +54,7 @@ var _ = Describe("[blobfuse-csi-e2e] [single-az] Pre-Provisioned", func() {
5354
)
5455
nodeid := os.Getenv("nodeid")
5556
blobfuseDriver := blobfuse.NewDriver(nodeid)
56-
endpoint := "unix:///tmp/csi.sock"
57+
endpoint := fmt.Sprintf("unix:///tmp/csi-%s.sock", uuid.NewUUID().String())
5758

5859
go func() {
5960
blobfuseDriver.Run(endpoint)

0 commit comments

Comments
 (0)