From 834cb0d40b55a542e88a75f5e732e7aa19b53d87 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Mon, 5 Jan 2026 04:00:13 +0900 Subject: internal/pkg: override "." for directory checksum This makes the checksum consistent with the final resting state of artifact directories without incurring the cost of an extra pair of chown syscalls. Signed-off-by: Ophestra --- internal/pkg/pkg_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'internal/pkg/pkg_test.go') diff --git a/internal/pkg/pkg_test.go b/internal/pkg/pkg_test.go index 1c650f14..99171f88 100644 --- a/internal/pkg/pkg_test.go +++ b/internal/pkg/pkg_test.go @@ -404,7 +404,7 @@ func TestCache(t *testing.T) { ) } wantChecksum := pkg.MustDecode( - "1TL00Qb8dcqayX7wTO8WNaraHvY6b-KCsctLDTrb64QBCmxj_-byK1HdIUwMaFEP", + "qRN6in76LndiiOZJheHkwyW8UT1N5-f-bXvHfDvwrMw2fSkOoZdh8pWE1qhLk65b", ) wantPathname := base.Append( "identifier", @@ -488,7 +488,7 @@ func TestCache(t *testing.T) { }, }}}, nil, pkg.Checksum{}, &pkg.ChecksumMismatchError{ Got: pkg.MustDecode( - "GbjlYMcHQANdfwL6qNGopBF99IscPTvCy95HSH1_kIF3eKjFDSLP0_iUUT0z8hiw", + "CUx-3hSbTWPsbMfDhgalG4Ni_GmR9TnVX8F99tY_P5GtkYvczg9RrF5zO0jX9XYT", ), }}, @@ -539,7 +539,7 @@ func TestCache(t *testing.T) { fs.ModeSymlink | 0777, )}, }) - }, pkg.MustDecode("8OP6YxJAdRrhV2WSBt1BPD7oC_n2Qh7JqUMyVMoGvjDX83bDqq2hgVMNcdiBH_64")}, + }, pkg.MustDecode("WVpvsVqVKg9Nsh744x57h51AuWUoUR2nnh8Md-EYBQpk6ziyTuUn6PLtF2e0Eu_d")}, {"pending", nil, func(t *testing.T, base *check.Absolute, c *pkg.Cache) { c.SetStrict(true) -- cgit v1.3.1