Merge pull request #109691 from zhangxyjlu/kubelet_testgetter

Add test case for getPodVolumeSubpathsDir
This commit is contained in:
Kubernetes Prow Robot 2022-06-27 18:09:57 -07:00 committed by GitHub
commit 92945a1a32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -90,4 +90,12 @@ func TestKubeletDirs(t *testing.T) {
got = kubelet.getPodResourcesDir()
exp = filepath.Join(root, "pod-resources")
assert.Equal(t, exp, got)
got = kubelet.GetHostname()
exp = "127.0.0.1"
assert.Equal(t, exp, got)
got = kubelet.getPodVolumeSubpathsDir("abc123")
exp = filepath.Join(root, "pods/abc123/volume-subpaths")
assert.Equal(t, exp, got)
}