diff options
Diffstat (limited to 'zenserver-test')
| -rw-r--r-- | zenserver-test/zenserver-test.cpp | 19 | ||||
| -rw-r--r-- | zenserver-test/zenserver-test.vcxproj | 2 |
2 files changed, 15 insertions, 6 deletions
diff --git a/zenserver-test/zenserver-test.cpp b/zenserver-test/zenserver-test.cpp index 8f38cc1be..b3a4348f0 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" @@ -1744,6 +1746,8 @@ TEST_CASE("zcache.policy") zen::CbPackage Package; const bool Ok = Package.TryLoad(Body); + CHECK(Ok); + CbObject CacheRecord = Package.GetObject(); std::vector<IoHash> AttachmentKeys; @@ -1763,6 +1767,7 @@ TEST_CASE("zcache.policy") zen::CbPackage Package; const bool Ok = Package.TryLoad(Body); + CHECK(Ok); CHECK(Package.GetAttachments().size() != 0); } } @@ -1801,6 +1806,7 @@ TEST_CASE("zcache.policy") zen::IoBuffer Body(zen::IoBuffer::Wrap, Result.text.data(), Result.text.size()); zen::CbPackage Package; const bool Ok = Package.TryLoad(Body); + CHECK(Ok); CbObject CacheRecord = Package.GetObject(); std::vector<IoHash> AttachmentKeys; @@ -1820,6 +1826,7 @@ TEST_CASE("zcache.policy") zen::IoBuffer Body(zen::IoBuffer::Wrap, Result.text.data(), Result.text.size()); zen::CbPackage Package; const bool Ok = Package.TryLoad(Body); + CHECK(Ok); CHECK(Package.GetAttachments().size() != 0); } @@ -2197,6 +2204,8 @@ TEST_CASE("zcache.rpc") } } +# if ZEN_USE_EXEC + struct RemoteExecutionRequest { RemoteExecutionRequest(std::string_view Host, int Port, std::filesystem::path& TreePath) @@ -2352,7 +2361,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); } { @@ -2361,14 +2370,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; @@ -2393,9 +2402,11 @@ TEST_CASE("mesh.basic") Instance->WaitUntilReady(); } -# endif +# endif } +# endif + class ZenServerTestHelper { public: diff --git a/zenserver-test/zenserver-test.vcxproj b/zenserver-test/zenserver-test.vcxproj index a39fce7ec..d632e395e 100644 --- a/zenserver-test/zenserver-test.vcxproj +++ b/zenserver-test/zenserver-test.vcxproj @@ -67,7 +67,6 @@ </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> - <WarningLevel>Level3</WarningLevel> <SDLCheck>true</SDLCheck> <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <ConformanceMode>true</ConformanceMode> @@ -79,7 +78,6 @@ </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ClCompile> - <WarningLevel>Level3</WarningLevel> <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> <SDLCheck>true</SDLCheck> |