From 90369861568d38737001f1d7e1304e6914675359 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Fri, 17 Apr 2026 16:46:49 +0900 Subject: cmd/mbf: optionally ignore reply An acknowledgement is not always required in this use case. This change also adds 64 bits of connection configuration for future expansion. Signed-off-by: Ophestra --- cmd/mbf/daemon_test.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'cmd/mbf/daemon_test.go') diff --git a/cmd/mbf/daemon_test.go b/cmd/mbf/daemon_test.go index cf67059a..2ec2e76a 100644 --- a/cmd/mbf/daemon_test.go +++ b/cmd/mbf/daemon_test.go @@ -3,6 +3,7 @@ package main import ( "bytes" "context" + "encoding/binary" "errors" "io" "log" @@ -17,7 +18,7 @@ import ( "hakurei.app/message" ) -func TestCureFromIR(t *testing.T) { +func TestNoReply(t *testing.T) { t.Parallel() if !daemonDeadline().IsZero() { t.Fatal("daemonDeadline did not return the zero value") @@ -45,7 +46,11 @@ func TestCureFromIR(t *testing.T) { } }() - if _err := c.EncodeAll( + if _, _err := client.Write( + binary.LittleEndian.AppendUint64(nil, remoteNoReply), + ); _err != nil { + panic(_err) + } else if _err = c.EncodeAll( client, pkg.NewFile("check", []byte{0}), ); _err != nil { @@ -105,7 +110,7 @@ func TestDaemon(t *testing.T) { }() var p *check.Absolute - p, err = cureRemote(ctx, &addr, pkg.NewFile("check", []byte{0})) + p, err = cureRemote(ctx, &addr, pkg.NewFile("check", []byte{0}), 0) if err != nil { t.Fatalf("cureRemote: error = %v", err) } -- cgit v1.3.1