Commit e811f5b9 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #33566 from guangxuli/k8s_0927_config_test

Automatic merge from submit-queue clean up the tmp Cert data
parents df064881 d8331735
...@@ -294,7 +294,7 @@ func TestEmbedNoKeyOrCertDisallowed(t *testing.T) { ...@@ -294,7 +294,7 @@ func TestEmbedNoKeyOrCertDisallowed(t *testing.T) {
func TestEmptyTokenAndCertAllowed(t *testing.T) { func TestEmptyTokenAndCertAllowed(t *testing.T) {
fakeCertFile, _ := ioutil.TempFile("", "cert-file") fakeCertFile, _ := ioutil.TempFile("", "cert-file")
defer os.Remove(fakeCertFile.Name())
expectedConfig := newRedFederalCowHammerConfig() expectedConfig := newRedFederalCowHammerConfig()
authInfo := clientcmdapi.NewAuthInfo() authInfo := clientcmdapi.NewAuthInfo()
authInfo.ClientCertificate = path.Base(fakeCertFile.Name()) authInfo.ClientCertificate = path.Base(fakeCertFile.Name())
...@@ -507,7 +507,7 @@ func TestUnsetBytes(t *testing.T) { ...@@ -507,7 +507,7 @@ func TestUnsetBytes(t *testing.T) {
func TestCAClearsInsecure(t *testing.T) { func TestCAClearsInsecure(t *testing.T) {
fakeCAFile, _ := ioutil.TempFile("", "ca-file") fakeCAFile, _ := ioutil.TempFile("", "ca-file")
defer os.Remove(fakeCAFile.Name())
clusterInfoWithInsecure := clientcmdapi.NewCluster() clusterInfoWithInsecure := clientcmdapi.NewCluster()
clusterInfoWithInsecure.InsecureSkipTLSVerify = true clusterInfoWithInsecure.InsecureSkipTLSVerify = true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment