Skip to content

Commit

Permalink
Merge pull request #206 from andyzhangx/rename-test2
Browse files Browse the repository at this point in the history
chore: rename driver tests
  • Loading branch information
andyzhangx committed Aug 7, 2020
2 parents 770acc9 + 3b54aa7 commit 36f0562
Show file tree
Hide file tree
Showing 15 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ csi plugin name: `blob.csi.azure.com`
### Container Images & Kubernetes Compatibility:
|Azure Blob Storage CSI driver Version | Image | 1.14+ |
|-----------------------------------------|----------------------------------------------------|--------|
|master branch |mcr.microsoft.com/k8s/csi/blobfuse-csi:latest | yes |
|master branch |mcr.microsoft.com/k8s/csi/blob-csi:latest | yes |
|v0.6.0 |mcr.microsoft.com/k8s/csi/blobfuse-csi:v0.6.0 | yes |
|v0.5.0 |mcr.microsoft.com/k8s/csi/blobfuse-csi:v0.5.0 | yes |
|v0.4.0 |mcr.microsoft.com/k8s/csi/blobfuse-csi:v0.4.0 | yes |
Expand Down
4 changes: 2 additions & 2 deletions deploy/example/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: pvc-blobfuse
name: pvc-blob
spec:
accessModes:
- ReadWriteOnce
Expand Down Expand Up @@ -42,7 +42,7 @@ spec:
volumes:
- name: blobfuse
persistentVolumeClaim:
claimName: pvc-blobfuse
claimName: pvc-blob
strategy:
rollingUpdate:
maxSurge: 0
Expand Down
8 changes: 4 additions & 4 deletions deploy/example/e2e_usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ kubectl create secret generic azure-secret --from-literal azurestorageaccountnam
apiVersion: v1
kind: PersistentVolume
metadata:
name: pv-blobfuse
name: pv-blob
spec:
capacity:
storage: 10Gi
Expand Down Expand Up @@ -82,7 +82,7 @@ kubectl create -f https://raw.githubusercontent.com/kubernetes-sigs/blobfuse-csi
#### 2. Validate PVC status and create an nginx pod
> make sure pvc is created and in `Bound` status
```console
watch kubectl describe pvc pvc-blobfuse
watch kubectl describe pvc pvc-blob
```

- create a pod with blobfuse CSI PVC
Expand All @@ -93,8 +93,8 @@ kubectl create -f https://raw.githubusercontent.com/kubernetes-sigs/blobfuse-csi
#### 3. enter the pod container to do validation
- watch the status of pod until its Status changed from `Pending` to `Running` and then enter the pod container
```console
$ watch kubectl describe po nginx-blobfuse
$ kubectl exec -it nginx-blobfuse -- bash
$ watch kubectl describe po nginx-blob
$ kubectl exec -it nginx-blob -- bash
Filesystem Size Used Avail Use% Mounted on
...
blobfuse 30G 8.9G 21G 31% /mnt/blob
Expand Down
10 changes: 5 additions & 5 deletions deploy/example/nginx-pod-blob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
kind: Pod
apiVersion: v1
metadata:
name: nginx-blobfuse
name: nginx-blob
spec:
containers:
- image: nginx
name: nginx-blobfuse
name: nginx-blob
command:
- "/bin/sh"
- "-c"
- while true; do echo $(date) >> /mnt/blob/outfile; sleep 1; done
volumeMounts:
- name: blobfuse01
- name: blob01
mountPath: "/mnt/blob"
volumes:
- name: blobfuse01
- name: blob01
persistentVolumeClaim:
claimName: pvc-blobfuse
claimName: pvc-blob
2 changes: 1 addition & 1 deletion deploy/example/pv-blobfuse-csi-keyvault.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: pv-blobfuse-keyvault
name: pv-blob-keyvault
spec:
capacity:
storage: 10Gi
Expand Down
2 changes: 1 addition & 1 deletion deploy/example/pv-blobfuse-csi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: pv-blobfuse
name: pv-blob
spec:
capacity:
storage: 10Gi
Expand Down
4 changes: 2 additions & 2 deletions deploy/example/pvc-blob-csi-static.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: pvc-blobfuse
name: pvc-blob
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 10Gi
volumeName: pv-blobfuse
volumeName: pv-blob
storageClassName: ""
2 changes: 1 addition & 1 deletion deploy/example/pvc-blob-csi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvc-blobfuse
name: pvc-blob
spec:
accessModes:
- ReadWriteMany
Expand Down
2 changes: 1 addition & 1 deletion pkg/blob/blob_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ func TestIsSASToken(t *testing.T) {
}

func TestIsCorruptedDir(t *testing.T) {
existingMountPath, err := ioutil.TempDir(os.TempDir(), "blobfuse-csi-mount-test")
existingMountPath, err := ioutil.TempDir(os.TempDir(), "blob-csi-mount-test")
if err != nil {
t.Fatalf("failed to create tmp dir: %v", err)
}
Expand Down
8 changes: 4 additions & 4 deletions pkg/blob/controllerserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest)
}, nil
}

// DeleteVolume delete an blobfuse
// DeleteVolume delete a volume
func (d *Driver) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error) {
if len(req.GetVolumeId()) == 0 {
return nil, status.Error(codes.InvalidArgument, "Volume ID missing in request")
Expand Down Expand Up @@ -260,7 +260,7 @@ func (d *Driver) ValidateVolumeCapabilities(ctx context.Context, req *csi.Valida
return nil, status.Error(codes.NotFound, "the requested volume does not exist")
}

// blobfuse supports all AccessModes, no need to check capabilities here
// blob driver supports all AccessModes, no need to check capabilities here
return &csi.ValidateVolumeCapabilitiesResponse{Message: ""}, nil
}

Expand All @@ -284,13 +284,13 @@ func (d *Driver) ListVolumes(ctx context.Context, req *csi.ListVolumesRequest) (
}

// ControllerPublishVolume make a volume available on some required node
// N/A for blobfuse
// N/A for blob driver
func (d *Driver) ControllerPublishVolume(ctx context.Context, req *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error) {
return nil, status.Error(codes.Unimplemented, "")
}

// ControllerUnpublishVolume make the volume unavailable on a specified node
// N/A for blobfuse
// N/A for blob driver
func (d *Driver) ControllerUnpublishVolume(ctx context.Context, req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error) {
return nil, status.Error(codes.Unimplemented, "")
}
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/dynamic_provisioning_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import (
"k8s.io/kubernetes/test/e2e/framework"
)

var _ = ginkgo.Describe("[blobfuse-csi-e2e] Dynamic Provisioning", func() {
f := framework.NewDefaultFramework("blobfuse")
var _ = ginkgo.Describe("[blob-csi-e2e] Dynamic Provisioning", func() {
f := framework.NewDefaultFramework("blob")

var (
cs clientset.Interface
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/pre_provisioning_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ var (
defaultVolumeSizeBytes int64 = defaultVolumeSize * 1024 * 1024 * 1024
)

var _ = ginkgo.Describe("[blobfuse-csi-e2e] Pre-Provisioned", func() {
f := framework.NewDefaultFramework("blobfuse")
var _ = ginkgo.Describe("[blob-csi-e2e] Pre-Provisioned", func() {
f := framework.NewDefaultFramework("blob")

var (
cs clientset.Interface
Expand Down Expand Up @@ -84,7 +84,7 @@ var _ = ginkgo.Describe("[blobfuse-csi-e2e] Pre-Provisioned", func() {
ginkgo.Fail(fmt.Sprintf("create volume error: %v", err))
}
volumeID = resp.Volume.VolumeId
ginkgo.By(fmt.Sprintf("Successfully provisioned BloBFuse volume: %q\n", volumeID))
ginkgo.By(fmt.Sprintf("Successfully provisioned blob volume: %q\n", volumeID))

volumeSize := fmt.Sprintf("%dGi", defaultVolumeSize)
pods := []testsuites.PodDetails{
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ var _ = ginkgo.BeforeSuite(func() {

var _ = ginkgo.AfterSuite(func() {
if testutil.IsRunningInProw() {
blobfuseLog := testCmd{
blobLog := testCmd{
command: "bash",
args: []string{"test/utils/blob_log.sh"},
startLog: "===================blobfuse log===================",
startLog: "===================blob log===================",
endLog: "==================================================",
}
e2eTeardown := testCmd{
Expand All @@ -117,7 +117,7 @@ var _ = ginkgo.AfterSuite(func() {
startLog: "Uninstalling Azure Blob Storage CSI driver...",
endLog: "Azure Blob Storage CSI driver uninstalled",
}
execTestCmd([]testCmd{blobfuseLog, e2eTeardown})
execTestCmd([]testCmd{blobLog, e2eTeardown})

// install/uninstall CSI Driver deployment scripts test
installDriver := testCmd{
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/testsuites/testsuites.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ func (t *TestPersistentVolumeClaim) DeleteBoundPersistentVolume() {

func (t *TestPersistentVolumeClaim) DeleteBackingVolume(azfile *blob.Driver) {
volumeID := t.persistentVolume.Spec.CSI.VolumeHandle
ginkgo.By(fmt.Sprintf("deleting blobfuse volume %q", volumeID))
ginkgo.By(fmt.Sprintf("deleting blob volume %q", volumeID))
req := &csi.DeleteVolumeRequest{
VolumeId: volumeID,
}
Expand All @@ -297,7 +297,7 @@ type TestDeployment struct {
}

func NewTestDeployment(c clientset.Interface, ns *v1.Namespace, command string, pvc *v1.PersistentVolumeClaim, volumeName, mountPath string, readOnly bool) *TestDeployment {
generateName := "blobfuse-volume-tester-"
generateName := "blob-volume-tester-"
selectorValue := fmt.Sprintf("%s%d", generateName, rand.Int())
replicas := int32(1)
return &TestDeployment{
Expand Down Expand Up @@ -423,7 +423,7 @@ func NewTestPod(c clientset.Interface, ns *v1.Namespace, command string) *TestPo
namespace: ns,
pod: &v1.Pod{
ObjectMeta: metav1.ObjectMeta{
GenerateName: "blobfuse-volume-tester-",
GenerateName: "blob-volume-tester-",
},
Spec: v1.PodSpec{
Containers: []v1.Container{
Expand Down
2 changes: 1 addition & 1 deletion test/utils/check_driver_pods_restart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
set -e

echo "check the driver pods if restarts ..."
restarts=$(kubectl get pods -n kube-system | grep blobfuse | awk '{print $4}')
restarts=$(kubectl get pods -n kube-system | grep blob | awk '{print $4}')
for num in $restarts
do
if [ "$num" -ne "0" ]
Expand Down

0 comments on commit 36f0562

Please sign in to comment.