summaryrefslogtreecommitdiff
path: root/internal/resource/dir/dir_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-07-06 23:56:32 +0300
committerPaul Buetow <paul@buetow.org>2026-07-06 23:56:32 +0300
commit62ff4e782bc057d277a7c41fa35a665e2aeca045 (patch)
tree5ca14104e68a9815f20ae6802c78341c6dc94371 /internal/resource/dir/dir_test.go
parent5600bedb927e291e2e78e6140de256e1a1d4475c (diff)
initial package management
Diffstat (limited to 'internal/resource/dir/dir_test.go')
-rw-r--r--internal/resource/dir/dir_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/resource/dir/dir_test.go b/internal/resource/dir/dir_test.go
index c7ec92e..21af8e1 100644
--- a/internal/resource/dir/dir_test.go
+++ b/internal/resource/dir/dir_test.go
@@ -78,7 +78,7 @@ func TestPresentAbsentNonEmptyDirWithoutPruneFails(t *testing.T) {
t.Fatal(err)
}
- Present(path, IsAbsent())
+ Present(path, IsAbsent)
if err := resource.Apply(); err == nil {
t.Error("expected Apply to fail when removing non-empty directory without prune")
}
@@ -95,7 +95,7 @@ func TestPresentAbsentPruneDirectoryRecursive(t *testing.T) {
t.Fatal(err)
}
- Present(path, IsAbsent(), WithPrune())
+ Present(path, IsAbsent, WithPrune)
if err := resource.Apply(); err != nil {
t.Fatalf("Apply failed: %v", err)
}
@@ -116,7 +116,7 @@ func TestAbsentPruneDirectoryRecursive(t *testing.T) {
t.Fatal(err)
}
- Absent(path, WithPrune())
+ Absent(path, WithPrune)
if err := resource.Apply(); err != nil {
t.Fatalf("Apply failed: %v", err)
}
@@ -168,7 +168,7 @@ func TestPresentDirectoryWithSource(t *testing.T) {
t.Fatal(err)
}
- Present(dst, WithSource(src), WithPrune())
+ Present(dst, WithSource(src), WithPrune)
if err := resource.Apply(); err != nil {
t.Fatalf("Apply failed: %v", err)
}
@@ -284,7 +284,7 @@ func TestSourceCopyWithPruneKeepsTemplatedFile(t *testing.T) {
// Now apply with prune
resource.ResetRepository()
- Present(dst, WithSource(src), WithPrune())
+ Present(dst, WithSource(src), WithPrune)
if err := resource.Apply(); err != nil {
t.Fatalf("Apply failed: %v", err)
}