basic regression test of runDockershim

- added basic regression test to ensure an error is raised in the
   case of an unconfigured runtime, and the case of asking for a docker
   runtime when compiled dockerless

Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
This commit is contained in:
Morgan Bauer
2020-06-09 23:27:13 -07:00
parent 13f1d956ea
commit cb4b67a886
2 changed files with 40 additions and 0 deletions

View File

@@ -1953,6 +1953,13 @@ func TestSyncPodKillPod(t *testing.T) {
checkPodStatus(t, kl, pod, v1.PodFailed)
}
func TestPreInitRuntimeService(t *testing.T) {
err := PreInitRuntimeService(nil, nil, nil, "", "", "", "", "")
if err == nil {
t.Fatal("PreInitRuntimeService should fail when not configured with a container runtime")
}
}
func waitForVolumeUnmount(
volumeManager kubeletvolume.VolumeManager,
pod *v1.Pod) error {