diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-04-10 20:39:06 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-04-10 20:47:30 +0900 |
| commit | 560cb626a1a8f7d4bfca5d30f262cc90fb5d4608 (patch) | |
| tree | 0be44e6cf70bae8b608b6a12efc06d66d1f2e5d9 /hst/config_test.go | |
| parent | c33a6a5b7ee130370aeeebf6635977415115f7da (diff) | |
hst: remove enablement json adapter
The go116 behaviour of built-in new function makes this cleaner.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'hst/config_test.go')
| -rw-r--r-- | hst/config_test.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/hst/config_test.go b/hst/config_test.go index 22d764b5..7c6ade8c 100644 --- a/hst/config_test.go +++ b/hst/config_test.go @@ -64,44 +64,44 @@ func TestConfigValidate(t *testing.T) { }}, 0, &hst.AppError{Step: "validate configuration", Err: hst.ErrEnviron, Msg: `invalid environment variable "TERM\x00"`}}, - {"insecure pulse", &hst.Config{Enablements: hst.NewEnablements(hst.EPulse), Container: &hst.ContainerConfig{ + {"insecure pulse", &hst.Config{Enablements: new(hst.EPulse), Container: &hst.ContainerConfig{ Home: fhs.AbsTmp, Shell: fhs.AbsTmp, Path: fhs.AbsTmp, }}, 0, &hst.AppError{Step: "validate configuration", Err: hst.ErrInsecure, Msg: "enablement PulseAudio is insecure and no longer supported"}}, - {"direct wayland", &hst.Config{Enablements: hst.NewEnablements(hst.EWayland), DirectWayland: true, Container: &hst.ContainerConfig{ + {"direct wayland", &hst.Config{Enablements: new(hst.EWayland), DirectWayland: true, Container: &hst.ContainerConfig{ Home: fhs.AbsTmp, Shell: fhs.AbsTmp, Path: fhs.AbsTmp, }}, 0, &hst.AppError{Step: "validate configuration", Err: hst.ErrInsecure, Msg: "direct_wayland is insecure and no longer supported"}}, - {"direct wayland allow", &hst.Config{Enablements: hst.NewEnablements(hst.EWayland), DirectWayland: true, Container: &hst.ContainerConfig{ + {"direct wayland allow", &hst.Config{Enablements: new(hst.EWayland), DirectWayland: true, Container: &hst.ContainerConfig{ Home: fhs.AbsTmp, Shell: fhs.AbsTmp, Path: fhs.AbsTmp, }}, hst.VAllowInsecure, nil}, - {"direct pipewire", &hst.Config{Enablements: hst.NewEnablements(hst.EPipeWire), DirectPipeWire: true, Container: &hst.ContainerConfig{ + {"direct pipewire", &hst.Config{Enablements: new(hst.EPipeWire), DirectPipeWire: true, Container: &hst.ContainerConfig{ Home: fhs.AbsTmp, Shell: fhs.AbsTmp, Path: fhs.AbsTmp, }}, 0, &hst.AppError{Step: "validate configuration", Err: hst.ErrInsecure, Msg: "direct_pipewire is insecure and no longer supported"}}, - {"direct pipewire allow", &hst.Config{Enablements: hst.NewEnablements(hst.EPipeWire), DirectPipeWire: true, Container: &hst.ContainerConfig{ + {"direct pipewire allow", &hst.Config{Enablements: new(hst.EPipeWire), DirectPipeWire: true, Container: &hst.ContainerConfig{ Home: fhs.AbsTmp, Shell: fhs.AbsTmp, Path: fhs.AbsTmp, }}, hst.VAllowInsecure, nil}, - {"direct pulse", &hst.Config{Enablements: hst.NewEnablements(hst.EPulse), DirectPulse: true, Container: &hst.ContainerConfig{ + {"direct pulse", &hst.Config{Enablements: new(hst.EPulse), DirectPulse: true, Container: &hst.ContainerConfig{ Home: fhs.AbsTmp, Shell: fhs.AbsTmp, Path: fhs.AbsTmp, }}, 0, &hst.AppError{Step: "validate configuration", Err: hst.ErrInsecure, Msg: "direct_pulse is insecure and no longer supported"}}, - {"direct pulse allow", &hst.Config{Enablements: hst.NewEnablements(hst.EPulse), DirectPulse: true, Container: &hst.ContainerConfig{ + {"direct pulse allow", &hst.Config{Enablements: new(hst.EPulse), DirectPulse: true, Container: &hst.ContainerConfig{ Home: fhs.AbsTmp, Shell: fhs.AbsTmp, Path: fhs.AbsTmp, |
