|
762 | 762 | v.remove(vol, volName)
|
763 | 763 | })
|
764 | 764 |
|
765 |
| - Context("ephemeral volumes", func() { |
766 |
| - doit := func(withFlag bool, repeatCalls int) { |
| 765 | + Context("CSI ephemeral volumes", func() { |
| 766 | + doit := func(withFlag bool, repeatCalls int, fsType string) { |
767 | 767 | targetPath := sc.TargetPath + "/ephemeral"
|
768 | 768 | params := map[string]string{
|
769 |
| - "size": "1Mi", |
| 769 | + "size": "100Mi", |
770 | 770 | }
|
771 | 771 | if withFlag {
|
772 | 772 | params["csi.storage.k8s.io/ephemeral"] = "true"
|
|
776 | 776 | VolumeContext: params,
|
777 | 777 | VolumeCapability: &csi.VolumeCapability{
|
778 | 778 | AccessType: &csi.VolumeCapability_Mount{
|
779 |
| - Mount: &csi.VolumeCapability_MountVolume{}, |
| 779 | + Mount: &csi.VolumeCapability_MountVolume{ |
| 780 | + FsType: fsType, |
| 781 | + }, |
780 | 782 | },
|
781 | 783 | AccessMode: &csi.VolumeCapability_AccessMode{
|
782 | 784 | Mode: csi.VolumeCapability_AccessMode_SINGLE_NODE_WRITER,
|
|
790 | 792 | _, err := nc.NodePublishVolume(ctx, &req)
|
791 | 793 | if err == nil {
|
792 | 794 | published = true
|
793 |
| - break |
794 | 795 | } else if failedPublish == nil {
|
795 | 796 | failedPublish = fmt.Errorf("NodePublishVolume for ephemeral volume, attempt #%d: %v", i, err)
|
796 | 797 | }
|
|
812 | 813 | }
|
813 | 814 |
|
814 | 815 | doall := func(withFlag bool) {
|
815 |
| - It("work", func() { |
816 |
| - doit(withFlag, 1) |
817 |
| - }) |
| 816 | + for _, fs := range []string{"default", "ext4", "xfs"} { |
| 817 | + fsType := fs |
| 818 | + if fsType == "default" { |
| 819 | + fsType = "" |
| 820 | + } |
| 821 | + Context(fs+" FS", func() { |
| 822 | + It("work", func() { |
| 823 | + doit(withFlag, 1, fsType) |
| 824 | + }) |
818 | 825 |
|
819 |
| - It("are idempotent", func() { |
820 |
| - doit(withFlag, 10) |
821 |
| - }) |
| 826 | + It("are idempotent", func() { |
| 827 | + doit(withFlag, 10, fsType) |
| 828 | + }) |
| 829 | + }) |
| 830 | + } |
822 | 831 | }
|
823 | 832 |
|
824 | 833 | Context("with csi.storage.k8s.io/ephemeral", func() {
|
|
0 commit comments