mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-12-10 20:13:53 +00:00
use temp kubeconfig for fake factory
This commit is contained in:
@@ -33,6 +33,8 @@ func TestCreateClusterRole(t *testing.T) {
|
||||
clusterRoleName := "my-cluster-role"
|
||||
|
||||
tf := cmdtesting.NewTestFactory()
|
||||
defer tf.Cleanup()
|
||||
|
||||
tf.Namespace = "test"
|
||||
tf.Client = &fake.RESTClient{}
|
||||
tf.ClientConfigVal = defaultClientConfig()
|
||||
@@ -148,6 +150,8 @@ func TestCreateClusterRole(t *testing.T) {
|
||||
|
||||
func TestClusterRoleValidate(t *testing.T) {
|
||||
tf := cmdtesting.NewTestFactory()
|
||||
defer tf.Cleanup()
|
||||
|
||||
tf.Namespace = "test"
|
||||
|
||||
tests := map[string]struct {
|
||||
|
||||
Reference in New Issue
Block a user