summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorewy <ewy0@protonmail.com>2026-05-17 02:15:57 +0200
committerewy <ewy0@protonmail.com>2026-05-17 02:15:57 +0200
commit45d1755e9f28853186613e97b034c2020f9d98e4 (patch)
treeca9fa2d0f76efc3ee0f9cac8cf27d7d711961baf
parent5cfc8bd701037a215c62789916cda283a018d3fd (diff)
fix test which creates orphaned file
-rw-r--r--.gitignore5
-rw-r--r--cache/cache_test.go4
2 files changed, 6 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index 658971a..cdbeccf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,6 @@
.idea
web/coverage.html
-coverage.out \ No newline at end of file
+coverage.out
+
+# build artifact
+pik \ No newline at end of file
diff --git a/cache/cache_test.go b/cache/cache_test.go
index 7746be4..a58bf95 100644
--- a/cache/cache_test.go
+++ b/cache/cache_test.go
@@ -209,9 +209,9 @@ func TestMergeNilNormal(t *testing.T) {
func TestInsert(t *testing.T) {
d := t.TempDir()
- st := TState(TSource("source", "target"))
- paths.Set(paths.CacheDir, d)
+ paths.Set(paths.ContextsFile, filepath.Join(d, "contexts"))
defer paths.Reset()
+ st := TState(TSource("source", "target"))
err := MergeAndSave(st)
assert.NoError(t, err)
}