mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-24 19:12:02 +00:00
clean up the tmp Cert data
use function os.Remove to remove file
This commit is contained in:
parent
08dd569424
commit
d8331735a2
@ -294,7 +294,7 @@ func TestEmbedNoKeyOrCertDisallowed(t *testing.T) {
|
||||
|
||||
func TestEmptyTokenAndCertAllowed(t *testing.T) {
|
||||
fakeCertFile, _ := ioutil.TempFile("", "cert-file")
|
||||
|
||||
defer os.Remove(fakeCertFile.Name())
|
||||
expectedConfig := newRedFederalCowHammerConfig()
|
||||
authInfo := clientcmdapi.NewAuthInfo()
|
||||
authInfo.ClientCertificate = path.Base(fakeCertFile.Name())
|
||||
@ -507,7 +507,7 @@ func TestUnsetBytes(t *testing.T) {
|
||||
|
||||
func TestCAClearsInsecure(t *testing.T) {
|
||||
fakeCAFile, _ := ioutil.TempFile("", "ca-file")
|
||||
|
||||
defer os.Remove(fakeCAFile.Name())
|
||||
clusterInfoWithInsecure := clientcmdapi.NewCluster()
|
||||
clusterInfoWithInsecure.InsecureSkipTLSVerify = true
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user