mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-04-30 12:30:17 +00:00
test: fix flaky tests with nonexistent path assertions
Tests using /nonexistent/... paths fail in sandboxed environments where they return 'permission denied' instead of 'not exists'. Use /tmp/... paths instead which reliably return 'not exists'.
This commit is contained in:
parent
121adbf00a
commit
f77025fb2f
3 changed files with 168 additions and 3 deletions
|
|
@ -311,8 +311,8 @@ zero:300000:0
|
|||
t.Fatalf("expected 2 ranges, got %d", len(ranges))
|
||||
}
|
||||
|
||||
// Test missing file
|
||||
ranges, err = loadSubIDRanges("/nonexistent/file", nil)
|
||||
// Test missing file - use path under /tmp to reliably get "not exists" vs "permission denied"
|
||||
ranges, err = loadSubIDRanges("/tmp/nonexistent_subid_test_file_xyz123", nil)
|
||||
if err != nil {
|
||||
t.Fatalf("expected no error for nonexistent file, got %v", err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue