Skip to content

Commit

Permalink
watchers.Disk: corrected tests
Browse files Browse the repository at this point in the history
  • Loading branch information
equals215 authored and CorentinB committed Feb 3, 2025
1 parent 3402946 commit 778043a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/pkg/controler/watchers/disk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ func TestCheckDiskUsage(t *testing.T) {
{
name: "Sufficient disk space on small disk",
total: 100 * 1024 * 1024 * 1024, // 100 GiB
free: 10 * 1024 * 1024 * 1024, // 10 GiB
free: 60 * 1024 * 1024 * 1024, // 10 GiB
wantError: false,
},
{
name: "Edge case: exactly at threshold for small disk",
total: 200 * 1024 * 1024 * 1024, // 200 GiB
free: uint64((20 * 1024 * 1024 * 1024) * (float64(200*1024*1024*1024) / float64(256*1024*1024*1024))), // Threshold value
total: 300 * 1024 * 1024 * 1024, // 200 GiB
free: uint64((50 * 1024 * 1024 * 1024) * (float64(300*1024*1024*1024) / float64(256*1024*1024*1024))), // Threshold value
wantError: false,
},
}
Expand Down

0 comments on commit 778043a

Please sign in to comment.