internal/app: relocate state initialisation
All checks were successful
Test / Create distribution (push) Successful in 34s
Test / Sandbox (push) Successful in 2m9s
Test / Hakurei (push) Successful in 3m4s
Test / Hpkg (push) Successful in 4m4s
Test / Sandbox (race detector) (push) Successful in 4m37s
Test / Hakurei (race detector) (push) Successful in 5m18s
Test / Flake checks (push) Successful in 1m28s
All checks were successful
Test / Create distribution (push) Successful in 34s
Test / Sandbox (push) Successful in 2m9s
Test / Hakurei (push) Successful in 3m4s
Test / Hpkg (push) Successful in 4m4s
Test / Sandbox (race detector) (push) Successful in 4m37s
Test / Hakurei (race detector) (push) Successful in 5m18s
Test / Flake checks (push) Successful in 1m28s
This is useful for testing. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -450,15 +450,7 @@ func TestApp(t *testing.T) {
|
||||
|
||||
var gotSys *system.I
|
||||
{
|
||||
sPriv := outcomeState{
|
||||
ID: &tc.id,
|
||||
Identity: tc.config.Identity,
|
||||
UserID: (&Hsu{k: tc.k}).MustIDMsg(msg),
|
||||
EnvPaths: copyPaths(tc.k),
|
||||
Container: tc.config.Container,
|
||||
}
|
||||
|
||||
sPriv.populateEarly(tc.k, msg)
|
||||
sPriv := newOutcomeState(tc.k, msg, &tc.id, tc.config, &Hsu{k: tc.k})
|
||||
if err := sPriv.populateLocal(tc.k, msg); err != nil {
|
||||
t.Fatalf("populateLocal: error = %#v", err)
|
||||
}
|
||||
@@ -574,6 +566,7 @@ type stubNixOS struct {
|
||||
|
||||
func (k *stubNixOS) new(func(k syscallDispatcher)) { panic("not implemented") }
|
||||
|
||||
func (k *stubNixOS) getpid() int { return 0xdeadbeef }
|
||||
func (k *stubNixOS) getuid() int { return 1971 }
|
||||
func (k *stubNixOS) getgid() int { return 100 }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user