summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2020-03-12 16:59:14 +0100
committerTamás Zolnai <tamas.zolnai@collabora.com>2020-03-12 17:47:35 +0100
commit19a7f1d288f4ff57129078c339c09a78c0b2c2f4 (patch)
tree2cad022f883eda4e6c2c68a3ee0ed4d9d6976ecb
parentFix build for MOBILEAPP (diff)
downloadonline-19a7f1d288f4ff57129078c339c09a78c0b2c2f4.tar.gz
online-19a7f1d288f4ff57129078c339c09a78c0b2c2f4.zip
test: better fix for UnitWOPISaveAs test
Don't check the full URL, but just test some parts of it. Change-Id: I5367bf4f41dc26f311e03de7ce06349f744d0b85 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90428 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
-rw-r--r--test/UnitWOPISaveAs.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/test/UnitWOPISaveAs.cpp b/test/UnitWOPISaveAs.cpp
index 2831aa5433..46f5a23099 100644
--- a/test/UnitWOPISaveAs.cpp
+++ b/test/UnitWOPISaveAs.cpp
@@ -45,20 +45,14 @@ public:
{
const std::string message(data, len);
- const std::string expected(
- "saveas: url=" + helpers::getTestServerURI()
- + "/something%20wopi/files/1?access_token=anything&reuse_cookies=cook=well "
- "filename=hello%20world%251.pdf xfilename=hello world%1.pdf");
- if (message.find(expected) == 0)
+ if (message.find("saveas: url=") != std::string::npos &&
+ message.find(helpers::getTestServerURI()) != std::string::npos &&
+ message.find("filename=hello%20world%251.pdf") != std::string::npos)
{
// successfully exit the test if we also got the outgoing message
// notifying about saving the file
exitTest(TestResult::Ok);
}
- else
- {
- LOG_DBG("UnitWOPISaveAs: Skipping unexpected SendMessage: " << message);
- }
return false;
}