diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-04-03 16:15:50 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-04-03 16:16:55 +0900 |
| commit | 5093a06026b0f4abe6b16ccf5381a19caf594166 (patch) | |
| tree | c68bfce417b1ba13b3f0d01ba8849086ec5eb36d /internal/pkg/exec_test.go | |
| parent | 50c1d7f8806de519161bbc07bbc6f73b69f6bece (diff) | |
internal/pkg: cache flags
This is cleaner for extending the API.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/pkg/exec_test.go')
| -rw-r--r-- | internal/pkg/exec_test.go | 18 |
1 files changed, 6 insertions, 12 deletions
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{ |
