internal/app: filter ops in implementation
All checks were successful
Test / Create distribution (push) Successful in 35s
Test / Sandbox (push) Successful in 2m18s
Test / Hpkg (push) Successful in 4m1s
Test / Sandbox (race detector) (push) Successful in 4m28s
Test / Hakurei (race detector) (push) Successful in 5m19s
Test / Hakurei (push) Successful in 2m14s
Test / Flake checks (push) Successful in 1m33s

This is cleaner and less error-prone, and should also result in negligibly less memory allocation.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-10-10 02:23:34 +09:00
parent 4246256d78
commit 22ee5ae151
9 changed files with 57 additions and 84 deletions

View File

@@ -458,17 +458,14 @@ func TestApp(t *testing.T) {
Container: tc.config.Container,
}
sPriv.populateEarly(tc.k, msg, tc.config)
sPriv.populateEarly(tc.k, msg)
if err := sPriv.populateLocal(tc.k, msg); err != nil {
t.Fatalf("populateLocal: error = %#v", err)
}
gotSys = system.New(t.Context(), msg, sPriv.uid.unwrap())
stateSys := outcomeStateSys{config: tc.config, sys: gotSys, outcomeState: &sPriv}
for _, op := range sPriv.Shim.Ops {
if err := op.toSystem(&stateSys); err != nil {
t.Fatalf("toSystem: error = %#v", err)
}
if err := (&outcomeStateSys{config: tc.config, sys: gotSys, outcomeState: &sPriv}).toSystem(); err != nil {
t.Fatalf("toSystem: error = %#v", err)
}
go func() {