Merge pull request #82064 from RainbowMango/pr_cleanup_testtar_testdata

Cleanup cluster/images/conformance/go-runner test data after test done
This commit is contained in:
Kubernetes Prow Robot 2019-09-11 10:39:00 -07:00 committed by GitHub
commit 9592869783
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,6 +58,10 @@ func TestTar(t *testing.T) {
for _, tc := range testCases {
t.Run(tc.desc, func(t *testing.T) {
err := tarDir(tc.dir, tc.outpath)
if err == nil {
defer os.Remove(tc.outpath)
}
switch {
case err != nil && len(tc.expectErr) == 0:
t.Fatalf("Expected nil error but got %q", err)