mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-10 16:04:04 +00:00
test(multiplayer): preserve result integrity state
This commit is contained in:
@@ -29,3 +29,12 @@ func test_review_results_are_permitted_but_forged_states_are_not() -> void:
|
||||
# submit itself is asynchronous; the pure configuration boundary proves the
|
||||
# reporter can carry the REVIEW state selected by bounded overtime.
|
||||
assert_true(Client.result_nonce("match-123456789", "server-123456789", 1, 1, "REVIEW") != Client.result_nonce("match-123456789", "server-123456789", 1, 1, "CERTIFIED"), "integrity state binds the receipt identity")
|
||||
|
||||
|
||||
func test_match_net_forwards_review_integrity_to_the_reporter() -> void:
|
||||
var received: Array = []
|
||||
MatchNet.configure_result_submission(func(team_0: int, team_1: int, integrity: String): received.append_array([team_0, team_1, integrity]))
|
||||
assert_true(MatchNet.submit_authoritative_result({0: 1, 1: 1}, "REVIEW"), "configured reporter accepts the bounded-overtime outcome")
|
||||
assert_eq(received, [1, 1, "REVIEW"], "review state reaches the reporter and cannot become a rated result")
|
||||
MatchNet.configure_result_submission(Callable())
|
||||
assert_true(not MatchNet.submit_authoritative_result({0: 1, 1: 1}, "CERTIFIED"), "cleared reporter cannot silently claim result delivery")
|
||||
|
||||
Reference in New Issue
Block a user