]> git.localhorst.tv Git - blank.git/blobdiff - tst/integration/ServerTest.cpp
simple test for client
[blank.git] / tst / integration / ServerTest.cpp
index 9cee9ee1b90bd2024ba8d7d0e9820dd3c7a40b9a..8f55914afc90374097ad55112c49b657266b7a3f 100644 (file)
@@ -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<TestInstance> 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);
+       // setUp and testDown do all the tests
 }
 
 }