aboutsummaryrefslogtreecommitdiff
path: root/zenserver-test/zenserver-test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'zenserver-test/zenserver-test.cpp')
-rw-r--r--zenserver-test/zenserver-test.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/zenserver-test/zenserver-test.cpp b/zenserver-test/zenserver-test.cpp
index 0878678d8..ad467753c 100644
--- a/zenserver-test/zenserver-test.cpp
+++ b/zenserver-test/zenserver-test.cpp
@@ -54,6 +54,8 @@ ZEN_THIRD_PARTY_INCLUDES_END
#include <asio.hpp>
+#define ZEN_USE_EXEC 0 // Note: this should really be a global define to match the zenserver definition
+
//////////////////////////////////////////////////////////////////////////
#include "projectclient.h"
@@ -1745,6 +1747,8 @@ TEST_CASE("zcache.policy")
const bool Ok = Package.TryLoad(Body);
CHECK(Ok);
+ CHECK(Ok);
+
CbObject CacheRecord = Package.GetObject();
std::vector<IoHash> AttachmentKeys;
@@ -1765,6 +1769,7 @@ TEST_CASE("zcache.policy")
const bool Ok = Package.TryLoad(Body);
CHECK(Ok);
+ CHECK(Ok);
CHECK(Package.GetAttachments().size() != 0);
}
}
@@ -2201,6 +2206,8 @@ TEST_CASE("zcache.rpc")
}
}
+# if ZEN_USE_EXEC
+
struct RemoteExecutionRequest
{
RemoteExecutionRequest(std::string_view Host, int Port, std::filesystem::path& TreePath)
@@ -2356,7 +2363,7 @@ TEST_CASE("exec.basic")
RemoteRequest.Prep();
zen::CbObject Result = RemoteRequest.Exec();
- CHECK(Result["exitcode"].AsInt32(-1) == 0);
+ CHECK(Result["exitcode"sv].AsInt32(-1) == 0);
}
{
@@ -2365,14 +2372,14 @@ TEST_CASE("exec.basic")
RemoteRequest.Prep();
zen::CbObject Result = RemoteRequest.Exec();
- CHECK(Result["exitcode"].AsInt32(-1) == 1);
+ CHECK(Result["exitcode"sv].AsInt32(-1) == 1);
}
}
TEST_CASE("mesh.basic")
{
// --mesh option only available with ZEN_ENABLE_MESH
-# if ZEN_ENABLE_MESH
+# if ZEN_ENABLE_MESH
using namespace std::literals;
const int kInstanceCount = 4;
@@ -2397,9 +2404,11 @@ TEST_CASE("mesh.basic")
Instance->WaitUntilReady();
}
-# endif
+# endif
}
+# endif
+
class ZenServerTestHelper
{
public: