mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 15:37:24 +00:00
Merge pull request #23368 from saad-ali/renameBuilderCleaner
Auto commit by PR queue bot
This commit is contained in:
@@ -548,12 +548,12 @@ func TestGetPodVolumesFromDisk(t *testing.T) {
|
||||
|
||||
volumesFound := kubelet.getPodVolumesFromDisk()
|
||||
if len(volumesFound) != len(expectedPaths) {
|
||||
t.Errorf("Expected to find %d cleaners, got %d", len(expectedPaths), len(volumesFound))
|
||||
t.Errorf("Expected to find %d unmounters, got %d", len(expectedPaths), len(volumesFound))
|
||||
}
|
||||
for _, ep := range expectedPaths {
|
||||
found := false
|
||||
for _, cl := range volumesFound {
|
||||
if ep == cl.Cleaner.GetPath() {
|
||||
if ep == cl.Unmounter.GetPath() {
|
||||
found = true
|
||||
break
|
||||
}
|
||||
@@ -639,12 +639,12 @@ func TestCleanupOrphanedVolumes(t *testing.T) {
|
||||
|
||||
volumesFound := kubelet.getPodVolumesFromDisk()
|
||||
if len(volumesFound) != len(pathsOnDisk) {
|
||||
t.Errorf("Expected to find %d cleaners, got %d", len(pathsOnDisk), len(volumesFound))
|
||||
t.Errorf("Expected to find %d unmounters, got %d", len(pathsOnDisk), len(volumesFound))
|
||||
}
|
||||
for _, ep := range pathsOnDisk {
|
||||
found := false
|
||||
for _, cl := range volumesFound {
|
||||
if ep == cl.Cleaner.GetPath() {
|
||||
if ep == cl.Unmounter.GetPath() {
|
||||
found = true
|
||||
break
|
||||
}
|
||||
@@ -661,10 +661,10 @@ func TestCleanupOrphanedVolumes(t *testing.T) {
|
||||
}
|
||||
volumesFound = kubelet.getPodVolumesFromDisk()
|
||||
if len(volumesFound) != 0 {
|
||||
t.Errorf("Expected to find 0 cleaners, got %d", len(volumesFound))
|
||||
t.Errorf("Expected to find 0 unmounters, got %d", len(volumesFound))
|
||||
}
|
||||
for _, cl := range volumesFound {
|
||||
t.Errorf("Found unexpected volume %s", cl.Cleaner.GetPath())
|
||||
t.Errorf("Found unexpected volume %s", cl.Unmounter.GetPath())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -716,9 +716,9 @@ func TestMakeVolumeMounts(t *testing.T) {
|
||||
}
|
||||
|
||||
podVolumes := kubecontainer.VolumeMap{
|
||||
"disk": kubecontainer.VolumeInfo{Builder: &stubVolume{path: "/mnt/disk"}},
|
||||
"disk4": kubecontainer.VolumeInfo{Builder: &stubVolume{path: "/mnt/host"}},
|
||||
"disk5": kubecontainer.VolumeInfo{Builder: &stubVolume{path: "/var/lib/kubelet/podID/volumes/empty/disk5"}},
|
||||
"disk": kubecontainer.VolumeInfo{Mounter: &stubVolume{path: "/mnt/disk"}},
|
||||
"disk4": kubecontainer.VolumeInfo{Mounter: &stubVolume{path: "/mnt/host"}},
|
||||
"disk5": kubecontainer.VolumeInfo{Mounter: &stubVolume{path: "/var/lib/kubelet/podID/volumes/empty/disk5"}},
|
||||
}
|
||||
|
||||
pod := api.Pod{
|
||||
|
||||
Reference in New Issue
Block a user