aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/pkg/clean_test.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-06-02 15:37:55 +0900
committerOphestra <cat@gensokyo.uk>2026-06-02 15:37:55 +0900
commit74c18390b4d0e33f960622fa158be09f46491eb7 (patch)
tree2168d0c44a626c843f770b4b8dd277eab3849943 /internal/pkg/clean_test.go
parent1490b32387e52a21dc19495e15d32ee635bef710 (diff)
internal/pkg: correctly scrub substitute status
Scrubbing for status predates substitutes. This change fixes scrub handling of substitute status entries. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/pkg/clean_test.go')
-rw-r--r--internal/pkg/clean_test.go22
1 files changed, 1 insertions, 21 deletions
diff --git a/internal/pkg/clean_test.go b/internal/pkg/clean_test.go
index 1b93185c..9b71a777 100644
--- a/internal/pkg/clean_test.go
+++ b/internal/pkg/clean_test.go
@@ -6,13 +6,11 @@ import (
"io/fs"
"log"
"os"
- "path/filepath"
"slices"
"strings"
"testing"
"unique"
- "hakurei.app/check"
"hakurei.app/internal/pkg"
"hakurei.app/message"
)
@@ -236,25 +234,7 @@ func TestClean(t *testing.T) {
t.Run(tc.name, func(t *testing.T) {
t.Parallel()
- base := check.MustAbs(t.TempDir())
- if err := os.Chmod(base.String(), 0700); err != nil {
- t.Fatal(err)
- }
- t.Cleanup(func() {
- if err := filepath.WalkDir(base.String(), func(path string, d fs.DirEntry, err error) error {
- if err != nil {
- t.Error(err)
- return nil
- }
- if !d.IsDir() {
- return nil
- }
- return os.Chmod(path, 0700)
- }); err != nil {
- t.Fatal(err)
- }
- })
-
+ base := makeBase(t)
msg := message.New(log.New(os.Stderr, "clean: ", 0))
msg.SwapVerbose(testing.Verbose())
c, err := pkg.Open(t.Context(), msg, 0, 0, 0, base)