helper/bwrap: move test out of bwrap package
All checks were successful
Tests / Go tests (push) Successful in 36s
Nix / NixOS tests (push) Successful in 4m51s

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
Ophestra 2025-01-05 19:45:24 +09:00
parent 2162029f46
commit 2e3f6a4c51
Signed by: cat
SSH Key Fingerprint: SHA256:gQ67O0enBZ7UdZypgtspB2FDM1g3GVw8nX0XSdcFw8Q

View File

@ -1,19 +1,21 @@
package bwrap package bwrap_test
import ( import (
"slices" "slices"
"testing" "testing"
"git.gensokyo.uk/security/fortify/helper/bwrap"
) )
func TestConfig_Args(t *testing.T) { func TestConfig_Args(t *testing.T) {
testCases := []struct { testCases := []struct {
name string name string
conf *Config conf *bwrap.Config
want []string want []string
}{ }{
{ {
name: "xdg-dbus-proxy constraint sample", name: "xdg-dbus-proxy constraint sample",
conf: (&Config{ conf: (&bwrap.Config{
Unshare: nil, Unshare: nil,
UserNS: false, UserNS: false,
Clearenv: true, Clearenv: true,
@ -71,7 +73,7 @@ func TestConfig_Args(t *testing.T) {
}, },
{ {
name: "fortify permissive default nixos", name: "fortify permissive default nixos",
conf: (&Config{ conf: (&bwrap.Config{
Unshare: nil, Unshare: nil,
Net: true, Net: true,
UserNS: true, UserNS: true,