Files
seaweedfs/seaweed-block/cmd/blockvolume/probe_ack_profile_test.go
T
pingqiuandClaude Opus 5.5 2da008f236 test(master): the automatic path holds on an ack profile mismatch (red)
The gate reads every frontier rule from blockmaster's
--launcher-replication-ack, but a volume runs its own --replication-ack.
Adds the wire field (ProbeAnswer.ack_profile) and the result fields, with
tests: both gates hold, without fencing, when an answer's profile is
missing or differs from the master's, or the master's is unknown; the
probe round names the mismatch; the volume answers its own profile;
blockmaster refuses an unknown --launcher-replication-ack.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 11:27:15 -08:00

15 lines
558 B
Go

package main
import "testing"
// The volume answers every promotion probe with its own --replication-ack,
// in the canonical form the master compares (best_effort, sync_quorum,
// sync_all).
func TestHostConfigAnswersTheVolumesOwnAckProfile(t *testing.T) {
for flag, want := range map[string]string{"best-effort": "best_effort", "sync-quorum": "sync_quorum", "sync-all": "sync_all"} {
if got := hostConfig(flags{replicationAck: flag}, nil).AckProfile; got != want {
t.Fatalf("--replication-ack=%s: AckProfile %q; want %q", flag, got, want)
}
}
}