diff options
Diffstat (limited to 'src/zenserver-test/hub-tests.cpp')
| -rw-r--r-- | src/zenserver-test/hub-tests.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/zenserver-test/hub-tests.cpp b/src/zenserver-test/hub-tests.cpp index 29c3b76ba..a372b11e5 100644 --- a/src/zenserver-test/hub-tests.cpp +++ b/src/zenserver-test/hub-tests.cpp @@ -44,7 +44,8 @@ TEST_CASE("hub.lifecycle.basic") HttpClient Client(Instance.GetBaseUri() + "/hub/"); HttpClient::Response Result = Client.Get("status"); - CHECK(Result); + REQUIRE(Result); + CHECK_EQ(Result.AsObject()["modules"].AsArrayView().Num(), 0u); } } @@ -71,6 +72,10 @@ TEST_CASE("hub.lifecycle.children") const uint16_t AbcPort = AbcResult["port"].AsUInt16(0); CHECK_NE(AbcPort, 0); + Result = Client.Get("modules/abc"); + REQUIRE(Result); + CHECK_EQ(Result.AsObject()["state"].AsString(), "provisioned"sv); + // This should be a fresh instance with no contents HttpClient AbcClient(fmt::format("http://localhost:{}", AbcPort)); @@ -231,9 +236,10 @@ TEST_CASE("hub.lifecycle.children") Result = Client.Post("modules/def/deprovision"); REQUIRE(Result); - // final sanity check that the hub is still responsive + // final sanity check that the hub is still responsive and all modules are gone Result = Client.Get("status"); - CHECK(Result); + REQUIRE(Result); + CHECK_EQ(Result.AsObject()["modules"].AsArrayView().Num(), 0u); } } |