X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=tst%2Fintegration%2FServerTest.cpp;h=8f55914afc90374097ad55112c49b657266b7a3f;hb=aee07b0f8d8c0d9af66dd7507938d83985d53833;hp=fbec21a70f7cd7d9fe96929c1f717129816f61ee;hpb=fd86376a8e7d3f1b09be3d018f772ef884937238;p=blank.git diff --git a/tst/integration/ServerTest.cpp b/tst/integration/ServerTest.cpp index fbec21a..8f55914 100644 --- a/tst/integration/ServerTest.cpp +++ b/tst/integration/ServerTest.cpp @@ -1,6 +1,6 @@ #include "ServerTest.hpp" -#include "TestServer.hpp" +#include "TestInstance.hpp" CPPUNIT_TEST_SUITE_REGISTRATION(blank::test::ServerTest); @@ -9,16 +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() { - TestServer server; + // setUp and testDown do all the tests } }