mirror of
https://github.com/kubernetes/client-go.git
synced 2025-08-07 02:13:45 +00:00
Calling os.Exit() skipped the `defer os.RemoveAll(tmp)` above and thus dangling files & dirs would appear in their $TMPDIR. Since go1.15 we can safely remove os.Exit() from TestMain() function. As this exact issue was common enough so that go1.15 changed[1] the API of TestMain to no longer require os.Exit to be called. Reproducer: $ (cd staging/src/k8s.io/client-go; go test ./tools/clientcmd) $ ls -d /tmp/testkubeconfig* /tmp/testkubeconfig1015943687 [1]: https://go-review.googlesource.com/c/go/+/219639 Kubernetes-commit: 457df1cf9817e29381609fbf2d85854a6b6a52ac |
||
---|---|---|
.. | ||
api | ||
auth_loaders.go | ||
client_config_test.go | ||
client_config.go | ||
config.go | ||
doc.go | ||
flag.go | ||
helpers.go | ||
loader_test.go | ||
loader.go | ||
main_test.go | ||
merge.go | ||
merged_client_builder_test.go | ||
merged_client_builder.go | ||
overrides_test.go | ||
overrides.go | ||
validation_test.go | ||
validation.go |