mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
Merge pull request #92013 from MHBauer/dockershim-error-test
basic regression test of runDockershim
This commit is contained in:
commit
fe1aeff2d2
33
pkg/kubelet/kubelet_dockerless_test.go
Normal file
33
pkg/kubelet/kubelet_dockerless_test.go
Normal file
@ -0,0 +1,33 @@
|
||||
// +build dockerless
|
||||
|
||||
/*
|
||||
Copyright 2020 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package kubelet_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"k8s.io/kubernetes/pkg/kubelet"
|
||||
kubetypes "k8s.io/kubernetes/pkg/kubelet/types"
|
||||
)
|
||||
|
||||
func TestPreInitRuntimeService(t *testing.T) {
|
||||
err := kubelet.PreInitRuntimeService(nil, nil, nil, kubetypes.DockerContainerRuntime, "", "", "", "")
|
||||
if err == nil {
|
||||
t.Fatal("PreInitRuntimeService should fail when configured to use docker and compiled dockerless")
|
||||
}
|
||||
}
|
@ -1955,6 +1955,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 {
|
||||
|
Loading…
Reference in New Issue
Block a user