aboutsummaryrefslogtreecommitdiffhomepage
path: root/hst
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-10-09 05:04:08 +0900
committerOphestra <cat@gensokyo.uk>2025-10-09 05:18:19 +0900
commit87b5c30ef6d5b7b8a10d6a5a8610054c403923e6 (patch)
tree805116c39a623bb30fc532af47ea3ed78b7304c0 /hst
parentdf9b77b077d967d35082adb8ab3b00dd67d7bc97 (diff)
message: relocate from container
This package is quite useful. This change allows it to be imported without importing container. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'hst')
-rw-r--r--hst/dbus_test.go8
-rw-r--r--hst/hst_test.go8
2 files changed, 8 insertions, 8 deletions
diff --git a/hst/dbus_test.go b/hst/dbus_test.go
index 8b04494b..d575f7d4 100644
--- a/hst/dbus_test.go
+++ b/hst/dbus_test.go
@@ -5,8 +5,8 @@ import (
"slices"
"testing"
- "hakurei.app/container"
"hakurei.app/hst"
+ "hakurei.app/message"
)
func TestBadInterfaceError(t *testing.T) {
@@ -26,10 +26,10 @@ func TestBadInterfaceError(t *testing.T) {
if gotError := tc.err.Error(); gotError != tc.want {
t.Errorf("Error: %s, want %s", gotError, tc.want)
}
- if gotMessage, ok := container.GetErrorMessage(tc.err); !ok {
- t.Error("GetErrorMessage: ok = false")
+ if gotMessage, ok := message.GetMessage(tc.err); !ok {
+ t.Error("GetMessage: ok = false")
} else if gotMessage != tc.want {
- t.Errorf("GetErrorMessage: %s, want %s", gotMessage, tc.want)
+ t.Errorf("GetMessage: %s, want %s", gotMessage, tc.want)
}
})
}
diff --git a/hst/hst_test.go b/hst/hst_test.go
index 90380e07..0bd6c2b0 100644
--- a/hst/hst_test.go
+++ b/hst/hst_test.go
@@ -8,9 +8,9 @@ import (
"syscall"
"testing"
- "hakurei.app/container"
"hakurei.app/container/stub"
"hakurei.app/hst"
+ "hakurei.app/message"
)
func TestAppError(t *testing.T) {
@@ -65,14 +65,14 @@ func TestAppError(t *testing.T) {
})
t.Run("message", func(t *testing.T) {
- gotMessage, gotMessageOk := container.GetErrorMessage(tc.err)
+ gotMessage, gotMessageOk := message.GetMessage(tc.err)
if want := tc.message != "\x00"; gotMessageOk != want {
- t.Errorf("GetErrorMessage: ok = %v, want %v", gotMessage, want)
+ t.Errorf("GetMessage: ok = %v, want %v", gotMessage, want)
}
if gotMessageOk {
if gotMessage != tc.message {
- t.Errorf("GetErrorMessage: %s, want %s", gotMessage, tc.message)
+ t.Errorf("GetMessage: %s, want %s", gotMessage, tc.message)
}
}
})