mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 10:53:34 +00:00
Fresh dep ensure
This commit is contained in:
20
vendor/k8s.io/kubernetes/pkg/volume/host_path/BUILD
generated
vendored
20
vendor/k8s.io/kubernetes/pkg/volume/host_path/BUILD
generated
vendored
@ -19,10 +19,10 @@ go_library(
|
||||
"//pkg/volume/util:go_default_library",
|
||||
"//pkg/volume/util/recyclerclient:go_default_library",
|
||||
"//pkg/volume/validation:go_default_library",
|
||||
"//vendor/k8s.io/api/core/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/uuid:go_default_library",
|
||||
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/util/uuid:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
@ -35,12 +35,12 @@ go_test(
|
||||
"//pkg/util/mount:go_default_library",
|
||||
"//pkg/volume:go_default_library",
|
||||
"//pkg/volume/testing:go_default_library",
|
||||
"//vendor/k8s.io/api/core/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/uuid:go_default_library",
|
||||
"//vendor/k8s.io/client-go/kubernetes/fake:go_default_library",
|
||||
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/util/uuid:go_default_library",
|
||||
"//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
1
vendor/k8s.io/kubernetes/pkg/volume/host_path/OWNERS
generated
vendored
1
vendor/k8s.io/kubernetes/pkg/volume/host_path/OWNERS
generated
vendored
@ -8,3 +8,4 @@ reviewers:
|
||||
- rootfs
|
||||
- jingxu97
|
||||
- msau42
|
||||
- dixudx
|
||||
|
2
vendor/k8s.io/kubernetes/pkg/volume/host_path/host_path.go
generated
vendored
2
vendor/k8s.io/kubernetes/pkg/volume/host_path/host_path.go
generated
vendored
@ -132,7 +132,7 @@ func (plugin *hostPathPlugin) NewUnmounter(volName string, podUID types.UID) (vo
|
||||
// HostPath recycling only works in single node clusters and is meant for testing purposes only.
|
||||
func (plugin *hostPathPlugin) Recycle(pvName string, spec *volume.Spec, eventRecorder recyclerclient.RecycleEventRecorder) error {
|
||||
if spec.PersistentVolume == nil || spec.PersistentVolume.Spec.HostPath == nil {
|
||||
return fmt.Errorf("spec.PersistentVolumeSource.HostPath is nil")
|
||||
return fmt.Errorf("spec.PersistentVolume.Spec.HostPath is nil")
|
||||
}
|
||||
|
||||
pod := plugin.config.RecyclerPodTemplate
|
||||
|
95
vendor/k8s.io/kubernetes/pkg/volume/host_path/host_path_test.go
generated
vendored
95
vendor/k8s.io/kubernetes/pkg/volume/host_path/host_path_test.go
generated
vendored
@ -17,7 +17,6 @@ limitations under the License.
|
||||
package host_path
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"testing"
|
||||
@ -171,7 +170,7 @@ func TestProvisioner(t *testing.T) {
|
||||
t.Errorf("Can't find the plugin by name")
|
||||
}
|
||||
options := volume.VolumeOptions{
|
||||
PVC: volumetest.CreateTestPVC("1Gi", []v1.PersistentVolumeAccessMode{v1.ReadWriteOnce}),
|
||||
PVC: volumetest.CreateTestPVC("1Gi", []v1.PersistentVolumeAccessMode{v1.ReadWriteOnce}),
|
||||
PersistentVolumeReclaimPolicy: v1.PersistentVolumeReclaimDelete,
|
||||
}
|
||||
creater, err := plug.NewProvisioner(options)
|
||||
@ -319,92 +318,6 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
type fakeFileTypeChecker struct {
|
||||
desiredType string
|
||||
}
|
||||
|
||||
func (fftc *fakeFileTypeChecker) Mount(source string, target string, fstype string, options []string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (fftc *fakeFileTypeChecker) Unmount(target string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (fftc *fakeFileTypeChecker) List() ([]utilmount.MountPoint, error) {
|
||||
return nil, nil
|
||||
}
|
||||
func (fftc *fakeFileTypeChecker) IsMountPointMatch(mp utilmount.MountPoint, dir string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (fftc *fakeFileTypeChecker) IsNotMountPoint(file string) (bool, error) {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
func (fftc *fakeFileTypeChecker) IsLikelyNotMountPoint(file string) (bool, error) {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
func (fftc *fakeFileTypeChecker) DeviceOpened(pathname string) (bool, error) {
|
||||
return false, nil
|
||||
}
|
||||
func (fftc *fakeFileTypeChecker) PathIsDevice(pathname string) (bool, error) {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
func (fftc *fakeFileTypeChecker) GetDeviceNameFromMount(mountPath, pluginDir string) (string, error) {
|
||||
return "fake", nil
|
||||
}
|
||||
|
||||
func (fftc *fakeFileTypeChecker) MakeRShared(path string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (fftc *fakeFileTypeChecker) MakeFile(pathname string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (fftc *fakeFileTypeChecker) MakeDir(pathname string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (fftc *fakeFileTypeChecker) ExistsPath(pathname string) (bool, error) {
|
||||
return true, nil
|
||||
}
|
||||
|
||||
func (fftc *fakeFileTypeChecker) GetFileType(_ string) (utilmount.FileType, error) {
|
||||
return utilmount.FileType(fftc.desiredType), nil
|
||||
}
|
||||
|
||||
func (fftc *fakeFileTypeChecker) PrepareSafeSubpath(subPath utilmount.Subpath) (newHostPath string, cleanupAction func(), err error) {
|
||||
return "", nil, nil
|
||||
}
|
||||
|
||||
func (fftc *fakeFileTypeChecker) CleanSubPaths(_, _ string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (fftc *fakeFileTypeChecker) SafeMakeDir(_, _ string, _ os.FileMode) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (fftc *fakeFileTypeChecker) GetMountRefs(pathname string) ([]string, error) {
|
||||
return nil, errors.New("not implemented")
|
||||
}
|
||||
|
||||
func (fftc *fakeFileTypeChecker) GetFSGroup(pathname string) (int64, error) {
|
||||
return -1, errors.New("not implemented")
|
||||
}
|
||||
|
||||
func (fftc *fakeFileTypeChecker) GetSELinuxSupport(pathname string) (bool, error) {
|
||||
return false, errors.New("not implemented")
|
||||
}
|
||||
|
||||
func (fftc *fakeFileTypeChecker) GetMode(pathname string) (os.FileMode, error) {
|
||||
return 0, errors.New("not implemented")
|
||||
}
|
||||
|
||||
func setUp() error {
|
||||
err := os.MkdirAll("/tmp/ExistingFolder", os.FileMode(0755))
|
||||
if err != nil {
|
||||
@ -473,7 +386,11 @@ func TestOSFileTypeChecker(t *testing.T) {
|
||||
}
|
||||
|
||||
for i, tc := range testCases {
|
||||
fakeFTC := &fakeFileTypeChecker{desiredType: tc.desiredType}
|
||||
fakeFTC := &utilmount.FakeMounter{
|
||||
Filesystem: map[string]utilmount.FileType{
|
||||
tc.path: utilmount.FileType(tc.desiredType),
|
||||
},
|
||||
}
|
||||
oftc := newFileTypeChecker(tc.path, fakeFTC)
|
||||
|
||||
path := oftc.GetPath()
|
||||
|
Reference in New Issue
Block a user