Commit graph

8 commits

Author SHA1 Message Date
Ashod Nakashian
68912b264e wsd: test: assertPutFileRequest returns the http response
This is optional, but when provided it's what the caller will
get, so that a given test can simulate different responses
from the WOPI-like host.

Change-Id: Iba5513174dc94757be09640d3fdb08b46af4a960
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-05-02 22:35:39 -04:00
Ashod Nakashian
95a9c5aaee wsd: test: simplify sending commands
This introduces a new macro, WSD_CMD,
used in tests only, to send a command
while logging it and its file/line of
origin.

Makes the tests more readable and the
logs more informative.

Only a handful of tests updated.

Change-Id: I55a38b35d7140a1f31f20c3c904d7eff6b19346f
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-01-13 08:07:06 -05:00
Ashod Nakashian
6db0d213bc wsd: test: make owner-termination test robust and simpler
We only modify the document after it has fully loaded.

Otherwise, we risk intermittent failures due to timing
issues with when the modify commands are processed.

It's also more readable this way.

Notice that we do close the document right after
sending the modify commands. This is to test that
the modification is actually registered and is
visible when the close command is processed.
This is the whole point of this test in the first place.

Change-Id: Id3bd598b9416be901a73d6cf804563d81a245ebb
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-01-13 08:07:06 -05:00
Ashod Nakashian
96c9e03b88 wsd: test: catch and fail WSD tests when exceptions are thrown
Change-Id: Ifaabb6387d86c5a80e00cd5de34093520a1e9d66
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2020-12-28 12:04:53 -04:00
Ashod Nakashian
3b4add03ef wsd: test: store the current test name in UnitBase
Change-Id: Iaf521f6a99dcd6e6465769aed7f3757332e04f7d
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2020-12-28 12:04:53 -04:00
Andras Timar
0002fdfd6c fix license headers
Change-Id: I8623770b32d278a45357dc7f757fabfadd2b4af7
2020-10-01 11:56:43 +02:00
Miklos Vajna
b773f11bdb WopiTestServer: make members private
Change-Id: If042fab5b69faf7c7dff975a95810cb96d8f02b0
2018-12-13 08:49:09 +01:00
Pranav Kant
5476774af1 wsd: Use a close request flag to break out of doc broker poll thread
... instead of directly stop()ing it. The close request approach also
makes sure that outgoing document is saved to storage.

Change-Id: I44f61db00dbd326dec80f59f4a2cbb617048aa94
Reviewed-on: https://gerrit.libreoffice.org/49122
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2018-02-07 14:30:33 +01:00