aboutsummaryrefslogtreecommitdiff
path: root/internal/game/shutdown_admission_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/game/shutdown_admission_test.go')
-rw-r--r--internal/game/shutdown_admission_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/game/shutdown_admission_test.go b/internal/game/shutdown_admission_test.go
index a7e7ee2..db31648 100644
--- a/internal/game/shutdown_admission_test.go
+++ b/internal/game/shutdown_admission_test.go
@@ -17,7 +17,7 @@ func TestShutdownRejectsSessionInput(t *testing.T) {
h.seedAccount("alice")
h.seedCharacter("alice", "alice")
sess, _ := h.connect("alice")
- sess.State = net.StateGame
+ sess.SetState(net.StateGame)
h.g.setShuttingDown()
h.g.stopOwner()
@@ -28,7 +28,7 @@ func TestShutdownRejectsSessionInput(t *testing.T) {
// A durable mutation gives an unambiguous admission check: description
// input would rewrite the character.
- sess.State = net.StateChangeDesc
+ sess.SetState(net.StateChangeDesc)
h.g.HandleSessionOnOwner(sess, "Input after final save")
if sess.Player.Description == "Input after final save" {
t.Error("session input still mutates character after shutdown/owner stop")
@@ -40,13 +40,13 @@ func TestShutdownRejectsInputDuringDrain(t *testing.T) {
h.seedAccount("alice")
h.seedCharacter("alice", "alice")
sess, _ := h.connect("alice")
- sess.State = net.StateGame
+ sess.SetState(net.StateGame)
h.g.setShuttingDown()
// During the drain window the owner is still alive, but new input is
// already rejected: only work accepted before shutdown executes.
h.g.HandleSessionOnOwner(sess, "look")
- sess.State = net.StateChangeDesc
+ sess.SetState(net.StateChangeDesc)
h.g.HandleSessionOnOwner(sess, "Input during drain")
if sess.Player.Description == "Input during drain" {
t.Error("session input accepted after shutdown began")