diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-03-25 01:52:49 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-03-25 01:52:49 +0900 |
| commit | 5c4058d5ac7e7944973ca8216c258fc50c194e22 (patch) | |
| tree | c06597903233c75eca5a1edae8b06d93f0f81774 /internal/app/app_test.go | |
| parent | e732dca7629edb503df0c65df5f37a99600d567d (diff) | |
app: run in native sandbox
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/app/app_test.go')
| -rw-r--r-- | internal/app/app_test.go | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/internal/app/app_test.go b/internal/app/app_test.go index b4481537..fa13ddd9 100644 --- a/internal/app/app_test.go +++ b/internal/app/app_test.go @@ -8,19 +8,19 @@ import ( "time" "git.gensokyo.uk/security/fortify/fst" - "git.gensokyo.uk/security/fortify/helper/bwrap" "git.gensokyo.uk/security/fortify/internal/app" "git.gensokyo.uk/security/fortify/internal/sys" + "git.gensokyo.uk/security/fortify/sandbox" "git.gensokyo.uk/security/fortify/system" ) type sealTestCase struct { - name string - os sys.State - config *fst.Config - id fst.ID - wantSys *system.I - wantBwrap *bwrap.Config + name string + os sys.State + config *fst.Config + id fst.ID + wantSys *system.I + wantContainer *sandbox.Params } func TestApp(t *testing.T) { @@ -30,15 +30,15 @@ func TestApp(t *testing.T) { t.Run(tc.name, func(t *testing.T) { a := app.NewWithID(tc.id, tc.os) var ( - gotSys *system.I - gotBwrap *bwrap.Config + gotSys *system.I + gotContainer *sandbox.Params ) if !t.Run("seal", func(t *testing.T) { if sa, err := a.Seal(tc.config); err != nil { t.Errorf("Seal: error = %v", err) return } else { - gotSys, gotBwrap = app.AppSystemBwrap(a, sa) + gotSys, gotContainer = app.AppIParams(a, sa) } }) { return @@ -51,10 +51,10 @@ func TestApp(t *testing.T) { } }) - t.Run("compare bwrap", func(t *testing.T) { - if !reflect.DeepEqual(gotBwrap, tc.wantBwrap) { - t.Errorf("seal: bwrap =\n%s\n, want\n%s", - mustMarshal(gotBwrap), mustMarshal(tc.wantBwrap)) + t.Run("compare params", func(t *testing.T) { + if !reflect.DeepEqual(gotContainer, tc.wantContainer) { + t.Errorf("seal: params =\n%s\n, want\n%s", + mustMarshal(gotContainer), mustMarshal(tc.wantContainer)) } }) }) |
