mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-09 12:07:47 +00:00
Cleanup UT test data after test done.
This commit is contained in:
parent
586d200e35
commit
6c46135ff5
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user