]> git.cworth.org Git - empires-server/commit
test: Maintain a list of activated players for automated cleanup
authorCarl Worth <cworth@cworth.org>
Sat, 27 Jun 2020 15:43:28 +0000 (08:43 -0700)
committerCarl Worth <cworth@cworth.org>
Sat, 27 Jun 2020 15:43:28 +0000 (08:43 -0700)
commitea2ea3dbf1184f5e21b3a9ead6dfec337710d18a
treea7ada4c6b053af1c638fbd3e261808465aaeeac6
parenta769d4675ee33d59d70e059870cc89c5ac731d07
test: Maintain a list of activated players for automated cleanup

The list of deactivate calls at the end of the test sutie was getting
rather messy, (since it required awareness of which players had been
activated in specific tests and then also which had _not_ been
deactivated in other tests).

Instead, we now store an array of each activated player, and loop over
that deactivating all players at the end. We also make deactivate
idempotent, safely doing nothing if we ask to deactivate a plyer which
was already deactivated.
test