Skip to content

Commit 46d0ffa

Browse files
committed
improve error reporting for missing tar files in tests
1 parent 239b376 commit 46d0ffa

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pkg/distribution/packaging/dirtar_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,8 @@ func TestDirTarProcessor_DoubleDotPrefixedDirectories(t *testing.T) {
366366
// Verify tar files exist and are not empty
367367
for i, tarPath := range tarPaths {
368368
info, err := os.Stat(tarPath)
369-
if os.IsNotExist(err) {
370-
t.Errorf("Tar file does not exist for %s: %s", doubleDotDirs[i], tarPath)
369+
if err != nil {
370+
t.Errorf("Failed to stat test file %q: %v", tarPath, err)
371371
}
372372
if info.Size() == 0 {
373373
t.Errorf("Tar file is empty for %s", doubleDotDirs[i])

0 commit comments

Comments
 (0)