MCPcopy
hub / github.com/kubernetes/kubectl / Cleanup

Method Cleanup

pkg/cmd/testing/fake.go:481–488  ·  view source on GitHub ↗

Cleanup cleans up TestFactory temp config file

()

Source from the content-addressed store, hash-verified

479
480// Cleanup cleans up TestFactory temp config file
481func (f *TestFactory) Cleanup() {
482 if f.tempConfigFile == nil {
483 return
484 }
485
486 f.tempConfigFile.Close()
487 os.Remove(f.tempConfigFile.Name())
488}
489
490// ToRESTConfig is used to get ClientConfigVal from a TestFactory
491func (f *TestFactory) ToRESTConfig() (*restclient.Config, error) {

Callers 15

TestValidateLogOptionsFunction · 0.95
TestLogCompleteFunction · 0.95
TestTaintFunction · 0.95
TestCordonFunction · 0.95
TestDrainFunction · 0.95
TestDeleteFlagValidationFunction · 0.95
TestApplyExtraArgsFailFunction · 0.95
TestAlphaEnablementFunction · 0.95
TestApplyFlagValidationFunction · 0.95

Calls 2

CloseMethod · 0.80
NameMethod · 0.65

Tested by 15

TestValidateLogOptionsFunction · 0.76
TestLogCompleteFunction · 0.76
TestTaintFunction · 0.76
TestCordonFunction · 0.76
TestDrainFunction · 0.76
TestDeleteFlagValidationFunction · 0.76
TestApplyExtraArgsFailFunction · 0.76
TestAlphaEnablementFunction · 0.76
TestApplyFlagValidationFunction · 0.76