From 74c18390b4d0e33f960622fa158be09f46491eb7 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Tue, 2 Jun 2026 15:37:55 +0900 Subject: internal/pkg: correctly scrub substitute status Scrubbing for status predates substitutes. This change fixes scrub handling of substitute status entries. Signed-off-by: Ophestra --- internal/pkg/clean_test.go | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) (limited to 'internal/pkg/clean_test.go') 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) -- cgit v1.3.1