Commit Graph

3 Commits

Author SHA1 Message Date
Šimon Lukašík
2d84553721 ci cleanup: make sure to remove test KUBECONFIGs
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
2025-07-21 10:46:37 +02:00
inosato
27de641f75 Remove ioutil from client-go
Signed-off-by: inosato <si17_21@yahoo.co.jp>

Kubernetes-commit: 88dfa51b6003c90e8f0a0508939a1d79950a40df
2022-07-30 20:54:41 +09:00
Jordan Liggitt
b620e827ab Isolate TestModifyContext from $KUBECONFIG
Kubernetes-commit: ce7e1e214a9b690f2222397c82c14c0d10905940
2021-02-01 14:03:07 -05:00