diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-10-08 04:57:22 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-10-08 04:57:22 +0900 |
| commit | 9b507715d42f74c3f18fe817c2464abfca1b0182 (patch) | |
| tree | c3d8ee5ef6809aaf3174bd6ecb00b8115261897e /hst/config_test.go | |
| parent | 12ab7ea3b465a130933efd9e7fe044f3636dc6ed (diff) | |
hst/dbus: validate interface strings
This is relocated to hst to validate early.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'hst/config_test.go')
| -rw-r--r-- | hst/config_test.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hst/config_test.go b/hst/config_test.go index ea50d4f1..eba2b793 100644 --- a/hst/config_test.go +++ b/hst/config_test.go @@ -20,6 +20,10 @@ func TestConfigValidate(t *testing.T) { Msg: "identity -1 out of range"}}, {"identity upper", &hst.Config{Identity: 10000}, &hst.AppError{Step: "validate configuration", Err: hst.ErrIdentityBounds, Msg: "identity 10000 out of range"}}, + {"dbus session", &hst.Config{SessionBus: &hst.BusConfig{See: []string{""}}}, + &hst.BadInterfaceError{Interface: "", Segment: "session"}}, + {"dbus system", &hst.Config{SystemBus: &hst.BusConfig{See: []string{""}}}, + &hst.BadInterfaceError{Interface: "", Segment: "system"}}, {"container", &hst.Config{}, &hst.AppError{Step: "validate configuration", Err: hst.ErrConfigNull, Msg: "configuration missing container state"}}, {"home", &hst.Config{Container: &hst.ContainerConfig{}}, &hst.AppError{Step: "validate configuration", Err: hst.ErrConfigNull, |
