aboutsummaryrefslogtreecommitdiff
path: root/zenserver-test/zenserver-test.cpp
diff options
context:
space:
mode:
authorMartin Ridgers <[email protected]>2021-11-29 13:20:16 +0100
committerMartin Ridgers <[email protected]>2021-11-29 13:20:16 +0100
commita3656da7f5bc9ff1ea5d4bddd0ce936925e191d6 (patch)
tree8cf84434aa34ec0d3ebd28ac306d3ea371e91be5 /zenserver-test/zenserver-test.cpp
parentOnly Windows paths have drive letters (diff)
downloadzen-a3656da7f5bc9ff1ea5d4bddd0ce936925e191d6.tar.xz
zen-a3656da7f5bc9ff1ea5d4bddd0ce936925e191d6.zip
Use more correct paths for the project.basic test
Diffstat (limited to 'zenserver-test/zenserver-test.cpp')
-rw-r--r--zenserver-test/zenserver-test.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/zenserver-test/zenserver-test.cpp b/zenserver-test/zenserver-test.cpp
index 47e5d7a37..d19de95db 100644
--- a/zenserver-test/zenserver-test.cpp
+++ b/zenserver-test/zenserver-test.cpp
@@ -980,6 +980,10 @@ TEST_CASE("project.basic")
zen::StringBuilder<64> BaseUri;
BaseUri << "http://localhost:{}/prj/test"_format(PortNumber);
+ std::filesystem::path BinPath = zen::GetRunningExecutablePath();
+ std::filesystem::path RootPath = BinPath.parent_path().parent_path();
+ BinPath = BinPath.lexically_relative(RootPath);
+
SUBCASE("build store init")
{
{
@@ -988,7 +992,7 @@ TEST_CASE("project.basic")
Body << "id"
<< "test";
Body << "root"
- << "/zooom";
+ << RootPath.c_str();
Body << "project"
<< "/zooom";
Body << "engine"
@@ -1008,7 +1012,7 @@ TEST_CASE("project.basic")
zen::CbObjectView ResponseObject = zen::CbFieldView(Response.text.data()).AsObjectView();
CHECK(ResponseObject["id"].AsString() == "test"sv);
- CHECK(ResponseObject["root"].AsString() == "/zooom"sv);
+ CHECK(ResponseObject["root"].AsString() == RootPath.c_str());
}
}
@@ -1050,13 +1054,11 @@ TEST_CASE("project.basic")
"00010000"};
auto FileOid = zen::Oid::FromHexString(ChunkId);
- std::filesystem::path ReliablePath = zen::GetRunningExecutablePath();
-
OpWriter.BeginArray("files");
OpWriter.BeginObject();
OpWriter << "id" << FileOid;
- OpWriter << "clientpath" << ReliablePath.c_str();
- OpWriter << "serverpath" << ReliablePath.c_str();
+ OpWriter << "clientpath" << "/{engine}/client/side/path";
+ OpWriter << "serverpath" << BinPath.c_str();
OpWriter.EndObject();
OpWriter.EndArray();