X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=tst%2Fintegration%2FServerTest.cpp;h=8f55914afc90374097ad55112c49b657266b7a3f;hb=aee07b0f8d8c0d9af66dd7507938d83985d53833;hp=c5ca60e4f34b12b11c99279abbf030b5fce91b73;hpb=0644360107ca50d681ae8b8cad608c7bc2ec7a40;p=blank.git diff --git a/tst/integration/ServerTest.cpp b/tst/integration/ServerTest.cpp index c5ca60e..8f55914 100644 --- a/tst/integration/ServerTest.cpp +++ b/tst/integration/ServerTest.cpp @@ -9,20 +9,26 @@ namespace blank { namespace test { void ServerTest::setUp() { - + instance.reset(new TestInstance({ "--server" }, true)); + instance->AssertRunning(); + instance->AssertOutputLine("loading spawn chunks"); + instance->AssertOutputLine("listening on UDP port 12354"); } void ServerTest::tearDown() { - + std::unique_ptr inst(std::move(instance)); + if (inst) { + inst->Terminate(); + inst->AssertOutputLine("saving remaining chunks"); + inst->AssertNoOutput(); + inst->AssertNoError(); + inst->AssertExitStatus(0); + } } void ServerTest::testStartup() { - TestInstance server({ "--server" }, true); - server.AssertRunning(); - server.Terminate(); - server.AssertExitStatus(0); - server.AssertNoError(); + // setUp and testDown do all the tests } }