@@ -649,21 +649,21 @@ func (c *cephFSDriver) DeleteVolume(volType testpatterns.TestVolType) {
649
649
}
650
650
651
651
// Hostpath
652
- type hostpathDriver struct {
652
+ type hostPathDriver struct {
653
653
node v1.Node
654
654
655
655
driverInfo DriverInfo
656
656
}
657
657
658
- var _ TestDriver = & hostpathDriver {}
659
- var _ PreprovisionedVolumeTestDriver = & hostpathDriver {}
660
- var _ InlineVolumeTestDriver = & hostpathDriver {}
658
+ var _ TestDriver = & hostPathDriver {}
659
+ var _ PreprovisionedVolumeTestDriver = & hostPathDriver {}
660
+ var _ InlineVolumeTestDriver = & hostPathDriver {}
661
661
662
- // InitHostpathDriver returns hostpathDriver that implements TestDriver interface
663
- func InitHostpathDriver () TestDriver {
664
- return & hostpathDriver {
662
+ // InitHostpathDriver returns hostPathDriver that implements TestDriver interface
663
+ func InitHostPathDriver () TestDriver {
664
+ return & hostPathDriver {
665
665
driverInfo : DriverInfo {
666
- Name : "hostpath " ,
666
+ Name : "hostPath " ,
667
667
MaxFileSize : testpatterns .FileSizeMedium ,
668
668
SupportedFsType : sets .NewString (
669
669
"" , // Default fsType
@@ -675,15 +675,15 @@ func InitHostpathDriver() TestDriver {
675
675
}
676
676
}
677
677
678
- func (h * hostpathDriver ) GetDriverInfo () * DriverInfo {
678
+ func (h * hostPathDriver ) GetDriverInfo () * DriverInfo {
679
679
return & h .driverInfo
680
680
}
681
681
682
- func (h * hostpathDriver ) SkipUnsupportedTest (pattern testpatterns.TestPattern ) {
682
+ func (h * hostPathDriver ) SkipUnsupportedTest (pattern testpatterns.TestPattern ) {
683
683
}
684
684
685
- func (h * hostpathDriver ) GetVolumeSource (readOnly bool , fsType string ) * v1.VolumeSource {
686
- // hostpath doesn't support readOnly volume
685
+ func (h * hostPathDriver ) GetVolumeSource (readOnly bool , fsType string ) * v1.VolumeSource {
686
+ // hostPath doesn't support readOnly volume
687
687
if readOnly {
688
688
return nil
689
689
}
@@ -694,13 +694,13 @@ func (h *hostpathDriver) GetVolumeSource(readOnly bool, fsType string) *v1.Volum
694
694
}
695
695
}
696
696
697
- func (h * hostpathDriver ) CreateDriver () {
697
+ func (h * hostPathDriver ) CreateDriver () {
698
698
}
699
699
700
- func (h * hostpathDriver ) CleanupDriver () {
700
+ func (h * hostPathDriver ) CleanupDriver () {
701
701
}
702
702
703
- func (h * hostpathDriver ) CreateVolume (volType testpatterns.TestVolType ) {
703
+ func (h * hostPathDriver ) CreateVolume (volType testpatterns.TestVolType ) {
704
704
f := h .driverInfo .Framework
705
705
cs := f .ClientSet
706
706
@@ -710,11 +710,11 @@ func (h *hostpathDriver) CreateVolume(volType testpatterns.TestVolType) {
710
710
h .driverInfo .Config .ClientNodeName = node .Name
711
711
}
712
712
713
- func (h * hostpathDriver ) DeleteVolume (volType testpatterns.TestVolType ) {
713
+ func (h * hostPathDriver ) DeleteVolume (volType testpatterns.TestVolType ) {
714
714
}
715
715
716
- // HostpathSymlink
717
- type hostpathSymlinkDriver struct {
716
+ // HostPathSymlink
717
+ type hostPathSymlinkDriver struct {
718
718
node v1.Node
719
719
sourcePath string
720
720
targetPath string
@@ -723,15 +723,15 @@ type hostpathSymlinkDriver struct {
723
723
driverInfo DriverInfo
724
724
}
725
725
726
- var _ TestDriver = & hostpathSymlinkDriver {}
727
- var _ PreprovisionedVolumeTestDriver = & hostpathSymlinkDriver {}
728
- var _ InlineVolumeTestDriver = & hostpathSymlinkDriver {}
726
+ var _ TestDriver = & hostPathSymlinkDriver {}
727
+ var _ PreprovisionedVolumeTestDriver = & hostPathSymlinkDriver {}
728
+ var _ InlineVolumeTestDriver = & hostPathSymlinkDriver {}
729
729
730
- // InitHostpathSymlinkDriver returns hostpathSymlinkDriver that implements TestDriver interface
731
- func InitHostpathSymlinkDriver () TestDriver {
732
- return & hostpathSymlinkDriver {
730
+ // InitHostPathSymlinkDriver returns hostPathSymlinkDriver that implements TestDriver interface
731
+ func InitHostPathSymlinkDriver () TestDriver {
732
+ return & hostPathSymlinkDriver {
733
733
driverInfo : DriverInfo {
734
- Name : "hostpathSymlink " ,
734
+ Name : "hostPathSymlink " ,
735
735
MaxFileSize : testpatterns .FileSizeMedium ,
736
736
SupportedFsType : sets .NewString (
737
737
"" , // Default fsType
@@ -743,15 +743,15 @@ func InitHostpathSymlinkDriver() TestDriver {
743
743
}
744
744
}
745
745
746
- func (h * hostpathSymlinkDriver ) GetDriverInfo () * DriverInfo {
746
+ func (h * hostPathSymlinkDriver ) GetDriverInfo () * DriverInfo {
747
747
return & h .driverInfo
748
748
}
749
749
750
- func (h * hostpathSymlinkDriver ) SkipUnsupportedTest (pattern testpatterns.TestPattern ) {
750
+ func (h * hostPathSymlinkDriver ) SkipUnsupportedTest (pattern testpatterns.TestPattern ) {
751
751
}
752
752
753
- func (h * hostpathSymlinkDriver ) GetVolumeSource (readOnly bool , fsType string ) * v1.VolumeSource {
754
- // hostpath doesn't support readOnly volume
753
+ func (h * hostPathSymlinkDriver ) GetVolumeSource (readOnly bool , fsType string ) * v1.VolumeSource {
754
+ // hostPathSymlink doesn't support readOnly volume
755
755
if readOnly {
756
756
return nil
757
757
}
@@ -762,13 +762,13 @@ func (h *hostpathSymlinkDriver) GetVolumeSource(readOnly bool, fsType string) *v
762
762
}
763
763
}
764
764
765
- func (h * hostpathSymlinkDriver ) CreateDriver () {
765
+ func (h * hostPathSymlinkDriver ) CreateDriver () {
766
766
}
767
767
768
- func (h * hostpathSymlinkDriver ) CleanupDriver () {
768
+ func (h * hostPathSymlinkDriver ) CleanupDriver () {
769
769
}
770
770
771
- func (h * hostpathSymlinkDriver ) CreateVolume (volType testpatterns.TestVolType ) {
771
+ func (h * hostPathSymlinkDriver ) CreateVolume (volType testpatterns.TestVolType ) {
772
772
f := h .driverInfo .Framework
773
773
cs := f .ClientSet
774
774
@@ -784,7 +784,7 @@ func (h *hostpathSymlinkDriver) CreateVolume(volType testpatterns.TestVolType) {
784
784
cmd := fmt .Sprintf ("mkdir %v -m 777 && ln -s %v %v" , h .sourcePath , h .sourcePath , h .targetPath )
785
785
privileged := true
786
786
787
- // Launch pod to initialize hostpath directory and symlink
787
+ // Launch pod to initialize hostPath directory and symlink
788
788
h .prepPod = & v1.Pod {
789
789
ObjectMeta : metav1.ObjectMeta {
790
790
Name : fmt .Sprintf ("hostpath-symlink-prep-%s" , f .Namespace .Name ),
@@ -822,29 +822,29 @@ func (h *hostpathSymlinkDriver) CreateVolume(volType testpatterns.TestVolType) {
822
822
}
823
823
// h.prepPod will be reused in cleanupDriver.
824
824
pod , err := f .ClientSet .CoreV1 ().Pods (f .Namespace .Name ).Create (h .prepPod )
825
- Expect (err ).ToNot (HaveOccurred (), "while creating hostpath init pod" )
825
+ Expect (err ).ToNot (HaveOccurred (), "while creating hostPath init pod" )
826
826
827
827
err = framework .WaitForPodSuccessInNamespace (f .ClientSet , pod .Name , pod .Namespace )
828
- Expect (err ).ToNot (HaveOccurred (), "while waiting for hostpath init pod to succeed" )
828
+ Expect (err ).ToNot (HaveOccurred (), "while waiting for hostPath init pod to succeed" )
829
829
830
830
err = framework .DeletePodWithWait (f , f .ClientSet , pod )
831
- Expect (err ).ToNot (HaveOccurred (), "while deleting hostpath init pod" )
831
+ Expect (err ).ToNot (HaveOccurred (), "while deleting hostPath init pod" )
832
832
}
833
833
834
- func (h * hostpathSymlinkDriver ) DeleteVolume (volType testpatterns.TestVolType ) {
834
+ func (h * hostPathSymlinkDriver ) DeleteVolume (volType testpatterns.TestVolType ) {
835
835
f := h .driverInfo .Framework
836
836
837
837
cmd := fmt .Sprintf ("rm -rf %v&& rm -rf %v" , h .targetPath , h .sourcePath )
838
838
h .prepPod .Spec .Containers [0 ].Command = []string {"/bin/sh" , "-ec" , cmd }
839
839
840
840
pod , err := f .ClientSet .CoreV1 ().Pods (f .Namespace .Name ).Create (h .prepPod )
841
- Expect (err ).ToNot (HaveOccurred (), "while creating hostpath teardown pod" )
841
+ Expect (err ).ToNot (HaveOccurred (), "while creating hostPath teardown pod" )
842
842
843
843
err = framework .WaitForPodSuccessInNamespace (f .ClientSet , pod .Name , pod .Namespace )
844
- Expect (err ).ToNot (HaveOccurred (), "while waiting for hostpath teardown pod to succeed" )
844
+ Expect (err ).ToNot (HaveOccurred (), "while waiting for hostPath teardown pod to succeed" )
845
845
846
846
err = framework .DeletePodWithWait (f , f .ClientSet , pod )
847
- Expect (err ).ToNot (HaveOccurred (), "while deleting hostpath teardown pod" )
847
+ Expect (err ).ToNot (HaveOccurred (), "while deleting hostPath teardown pod" )
848
848
}
849
849
850
850
// emptydir
0 commit comments