aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/app/app_test.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-02-21 16:00:31 +0900
committerOphestra <cat@gensokyo.uk>2025-02-21 16:06:24 +0900
commitc64b8163e79d47f1e710c1d067589bb393f8463c (patch)
treec4ffa5b89982af6362f1d65bf2ff2af299600574 /internal/app/app_test.go
parent9d9a165379798acb237c9071ea865f26cfba8be7 (diff)
app: separate instance from process state
This works better for the implementation. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/app/app_test.go')
-rw-r--r--internal/app/app_test.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/internal/app/app_test.go b/internal/app/app_test.go
index 6bdc043d..b4481537 100644
--- a/internal/app/app_test.go
+++ b/internal/app/app_test.go
@@ -29,17 +29,21 @@ func TestApp(t *testing.T) {
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
a := app.NewWithID(tc.id, tc.os)
-
+ var (
+ gotSys *system.I
+ gotBwrap *bwrap.Config
+ )
if !t.Run("seal", func(t *testing.T) {
- if err := a.Seal(tc.config); err != nil {
+ if sa, err := a.Seal(tc.config); err != nil {
t.Errorf("Seal: error = %v", err)
+ return
+ } else {
+ gotSys, gotBwrap = app.AppSystemBwrap(a, sa)
}
}) {
return
}
- gotSys, gotBwrap := app.AppSystemBwrap(a)
-
t.Run("compare sys", func(t *testing.T) {
if !gotSys.Equal(tc.wantSys) {
t.Errorf("Seal: sys = %#v, want %#v",