mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 16:06:51 +00:00
Move the common test functions from cmd_test.go to cmd/testing/fake.go
This is so that we can use NewAPIFactory() from cmd/set/*test.go Up until now we would get a import loop error. This commit also adds a basic unit test case for cmd/set/set_image.go
This commit is contained in:
@@ -28,6 +28,7 @@ import (
|
||||
"k8s.io/kubernetes/pkg/api/resource"
|
||||
"k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
cmdtesting "k8s.io/kubernetes/pkg/kubectl/cmd/testing"
|
||||
"testing"
|
||||
)
|
||||
|
||||
@@ -40,7 +41,7 @@ const (
|
||||
func TestTopSubcommandsExist(t *testing.T) {
|
||||
initTestErrorHandler(t)
|
||||
|
||||
f, _, _, _ := NewAPIFactory()
|
||||
f, _, _, _ := cmdtesting.NewAPIFactory()
|
||||
buf := bytes.NewBuffer([]byte{})
|
||||
|
||||
cmd := NewCmdTop(f, buf)
|
||||
|
||||
Reference in New Issue
Block a user