aboutsummaryrefslogtreecommitdiffhomepage
path: root/dbus/dbus_test.go
diff options
context:
space:
mode:
authorOphestra Umiker <cat@ophivana.moe>2024-09-28 17:00:20 +0900
committerOphestra Umiker <cat@ophivana.moe>2024-09-28 17:00:20 +0900
commitcf182d1fbefd140280fb0e4f44773931a7531295 (patch)
treebfe2a8e4a8182c16fae5555a2bb785c8efcb5cfb /dbus/dbus_test.go
parent996bf67ac29adbbac6a2026bb40272181f7065ba (diff)
dbus: seal test error check for correct error returned
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
Diffstat (limited to 'dbus/dbus_test.go')
-rw-r--r--dbus/dbus_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/dbus/dbus_test.go b/dbus/dbus_test.go
index e2e27956..5ea14670 100644
--- a/dbus/dbus_test.go
+++ b/dbus/dbus_test.go
@@ -6,6 +6,7 @@ import (
"testing"
"git.ophivana.moe/cat/fortify/dbus"
+ "git.ophivana.moe/cat/fortify/helper"
)
const (
@@ -51,7 +52,7 @@ func TestProxy_Seal(t *testing.T) {
for id, tc := range testCasePairs() {
t.Run("create seal for "+id, func(t *testing.T) {
p := dbus.New(binPath, tc[0].bus, tc[1].bus)
- if err := p.Seal(tc[0].c, tc[1].c); (err != nil) != tc[0].wantErr {
+ if err := p.Seal(tc[0].c, tc[1].c); (errors.Is(err, helper.ErrContainsNull)) != tc[0].wantErr {
t.Errorf("Seal(%p, %p) error = %v, wantErr %v",
tc[0].c, tc[1].c,
err, tc[0].wantErr)