diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2021-06-28 14:04:22 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2021-07-12 21:37:45 +0200 |
commit | 3db2e359a5085dc9afa4e1c36e402f281a15a127 (patch) | |
tree | 79c7bc078864e921a45a870aa83db4576c1d6770 /test | |
parent | ScrollSection: Make vertical and horizontal scroll bars always visible on des... (diff) | |
download | online-3db2e359a5085dc9afa4e1c36e402f281a15a127.tar.gz online-3db2e359a5085dc9afa4e1c36e402f281a15a127.zip |
HTTP 302 - updates after review
Change-Id: Iaac4384385e05f33472b6678422b4a444319b59c
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/UnitWOPIHttpRedirectLoop.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/test/UnitWOPIHttpRedirectLoop.cpp b/test/UnitWOPIHttpRedirectLoop.cpp index 70eca10e00..9b7d6f96e6 100644 --- a/test/UnitWOPIHttpRedirectLoop.cpp +++ b/test/UnitWOPIHttpRedirectLoop.cpp @@ -12,6 +12,7 @@ #include <Unit.hpp> #include <UnitHTTP.hpp> #include <helpers.hpp> +#include <wsd/Storage.hpp> #include <Poco/Net/HTTPRequest.h> @@ -52,22 +53,25 @@ public: assertCheckFileInfoRequest(request); - LOK_ASSERT_MESSAGE("It is expected to stop requesting after 21 redirections", fileId <= 22); + std::string sExpectedMessage = "It is expected to stop requesting after " + std::to_string(RedirectionLimit) + " redirections"; + LOK_ASSERT_MESSAGE(sExpectedMessage, fileId <= RedirectionLimit + 1); LOK_ASSERT_MESSAGE("Expected to be in Phase::Load or Phase::Redirected", _phase == Phase::Load || _phase == Phase::Redirected); _phase = Phase::Redirected; - if (fileId == 22) + if (fileId == RedirectionLimit + 1) _phase = Phase::Polling; std::ostringstream oss; oss << "HTTP/1.1 302 Found\r\n" - "Location: " << helpers::getTestServerURI() << redirectUri << fileId++ << "?" << params << "\r\n" + "Location: " << helpers::getTestServerURI() << redirectUri << fileId << "?" << params << "\r\n" "\r\n"; socket->send(oss.str()); socket->shutdown(); + fileId++; + return true; } |