Clean up logic for deprecated flag --container-runtime in kubelet
Signed-off-by: Ciprian Hacman <ciprian@hakman.dev>
This commit is contained in:
@@ -26,7 +26,6 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
cadvisorfs "github.com/google/cadvisor/fs"
|
||||
"k8s.io/kubernetes/pkg/kubelet/types"
|
||||
)
|
||||
|
||||
func TestImageFsInfoLabel(t *testing.T) {
|
||||
@@ -38,13 +37,11 @@ func TestImageFsInfoLabel(t *testing.T) {
|
||||
expectedError error
|
||||
}{{
|
||||
description: "LabelCrioImages should be returned",
|
||||
runtime: types.RemoteContainerRuntime,
|
||||
runtimeEndpoint: CrioSocket,
|
||||
expectedLabel: cadvisorfs.LabelCrioImages,
|
||||
expectedError: nil,
|
||||
}, {
|
||||
description: "Cannot find valid imagefs label",
|
||||
runtime: "invalid-runtime",
|
||||
runtimeEndpoint: "",
|
||||
expectedLabel: "",
|
||||
expectedError: fmt.Errorf("no imagefs label for configured runtime"),
|
||||
@@ -52,7 +49,7 @@ func TestImageFsInfoLabel(t *testing.T) {
|
||||
|
||||
for _, tc := range testcases {
|
||||
t.Run(tc.description, func(t *testing.T) {
|
||||
infoProvider := NewImageFsInfoProvider(tc.runtime, tc.runtimeEndpoint)
|
||||
infoProvider := NewImageFsInfoProvider(tc.runtimeEndpoint)
|
||||
label, err := infoProvider.ImageFsInfoLabel()
|
||||
assert.Equal(t, tc.expectedLabel, label)
|
||||
assert.Equal(t, tc.expectedError, err)
|
||||
|
Reference in New Issue
Block a user