mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-11 00:14:00 +00:00
feat: publish assignment rosters atomically
This commit is contained in:
@@ -29,3 +29,12 @@ func TestAssignmentStoreRejectsInvalidRecoveryAndManifestInputs(t *testing.T) {
|
||||
t.Fatal("out-of-range slot accepted")
|
||||
}
|
||||
}
|
||||
|
||||
func TestAssignmentStoreRejectsInvalidBatches(t *testing.T) {
|
||||
if err := SaveAssignments(nil, nil, nil); err == nil {
|
||||
t.Fatal("nil database/empty batch accepted")
|
||||
}
|
||||
if err := SaveAssignments(nil, nil, []DurableAssignment{{MatchID: "match-1", PlayerID: "player-1"}}); err == nil {
|
||||
t.Fatal("invalid assignment batch accepted")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user