From 5093a06026b0f4abe6b16ccf5381a19caf594166 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Fri, 3 Apr 2026 16:15:50 +0900 Subject: internal/pkg: cache flags This is cleaner for extending the API. Signed-off-by: Ophestra --- internal/pkg/exec_test.go | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'internal/pkg/exec_test.go') diff --git a/internal/pkg/exec_test.go b/internal/pkg/exec_test.go index b3eaa74e..cbd49013 100644 --- a/internal/pkg/exec_test.go +++ b/internal/pkg/exec_test.go @@ -33,8 +33,7 @@ func TestExec(t *testing.T) { ) checkWithCache(t, []cacheTestCase{ - {"offline", nil, func(t *testing.T, base *check.Absolute, c *pkg.Cache) { - c.SetStrict(true) + {"offline", pkg.CValidateKnown, nil, func(t *testing.T, base *check.Absolute, c *pkg.Cache) { testtool, testtoolDestroy := newTesttool() cureMany(t, c, []cureStep{ @@ -111,8 +110,7 @@ func TestExec(t *testing.T) { testtoolDestroy(t, base, c) }, pkg.MustDecode("Q5DluWQCAeohLoiGRImurwFp3vdz9IfQCoj7Fuhh73s4KQPRHpEQEnHTdNHmB8Fx")}, - {"net", nil, func(t *testing.T, base *check.Absolute, c *pkg.Cache) { - c.SetStrict(true) + {"net", pkg.CValidateKnown, nil, func(t *testing.T, base *check.Absolute, c *pkg.Cache) { testtool, testtoolDestroy := newTesttool() wantChecksum := pkg.MustDecode( @@ -146,8 +144,7 @@ func TestExec(t *testing.T) { testtoolDestroy(t, base, c) }, pkg.MustDecode("bPYvvqxpfV7xcC1EptqyKNK1klLJgYHMDkzBcoOyK6j_Aj5hb0mXNPwTwPSK5F6Z")}, - {"overlay root", nil, func(t *testing.T, base *check.Absolute, c *pkg.Cache) { - c.SetStrict(true) + {"overlay root", pkg.CValidateKnown, nil, func(t *testing.T, base *check.Absolute, c *pkg.Cache) { testtool, testtoolDestroy := newTesttool() cureMany(t, c, []cureStep{ @@ -172,8 +169,7 @@ func TestExec(t *testing.T) { testtoolDestroy(t, base, c) }, pkg.MustDecode("PO2DSSCa4yoSgEYRcCSZfQfwow1yRigL3Ry-hI0RDI4aGuFBha-EfXeSJnG_5_Rl")}, - {"overlay work", nil, func(t *testing.T, base *check.Absolute, c *pkg.Cache) { - c.SetStrict(true) + {"overlay work", pkg.CValidateKnown, nil, func(t *testing.T, base *check.Absolute, c *pkg.Cache) { testtool, testtoolDestroy := newTesttool() cureMany(t, c, []cureStep{ @@ -203,8 +199,7 @@ func TestExec(t *testing.T) { testtoolDestroy(t, base, c) }, pkg.MustDecode("iaRt6l_Wm2n-h5UsDewZxQkCmjZjyL8r7wv32QT2kyV55-Lx09Dq4gfg9BiwPnKs")}, - {"multiple layers", nil, func(t *testing.T, base *check.Absolute, c *pkg.Cache) { - c.SetStrict(true) + {"multiple layers", pkg.CValidateKnown, nil, func(t *testing.T, base *check.Absolute, c *pkg.Cache) { testtool, testtoolDestroy := newTesttool() cureMany(t, c, []cureStep{ @@ -256,8 +251,7 @@ func TestExec(t *testing.T) { testtoolDestroy(t, base, c) }, pkg.MustDecode("O2YzyR7IUGU5J2CADy0hUZ3A5NkP_Vwzs4UadEdn2oMZZVWRtH0xZGJ3HXiimTnZ")}, - {"overlay layer promotion", nil, func(t *testing.T, base *check.Absolute, c *pkg.Cache) { - c.SetStrict(true) + {"overlay layer promotion", pkg.CValidateKnown, nil, func(t *testing.T, base *check.Absolute, c *pkg.Cache) { testtool, testtoolDestroy := newTesttool() cureMany(t, c, []cureStep{ -- cgit v1.3.1