Commit Graph

22 Commits (master)

Author SHA1 Message Date
Michael Meeks 7183a3d3de spdx: improve machine and human readability of headers.
Change-Id: Ice934380029bf27054e830fffc07a5d037d1430f
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-11-14 19:36:31 +00:00
Paris Oplopoios cfd1d2e01f Revert "Give new sockets a canonical view id in tests"
This reverts commit a003126a65.

Signed-off-by: Paris Oplopoios <paris.oplopoios@collabora.com>
2023-09-06 10:28:26 +02:00
Caolán McNamara 62504735ea cid#318868 silence bogus Double free
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I4ef594a2274a6a2b646ce2a305cdab6263390ef7
2023-08-16 15:15:59 +02:00
Paris Oplopoios a003126a65 Give new sockets a canonical view id in tests
Signed-off-by: Paris Oplopoios <paris.oplopoios@collabora.com>
Change-Id: I0c8a534fccb8088ab303852304802b4926369058
2023-08-05 12:00:08 +03:00
Ashod Nakashian 6892d63916 wsd: test: minor cleanup of UnitWOPIWatermark
Change-Id: I9e69c432ee0c4a4f8fab3fe64137a4c33df7c811
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-06-20 03:55:19 -04:00
Ashod Nakashian bc5e9f1ed0 wsd: test: use configCheckFileInfo instead of handleHttpRequest
Change-Id: Iff526bda55e112877df74d55f21bc8108bb384f2
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-06-20 03:55:19 -04:00
Ashod Nakashian e93e7fd3b5 wsd: test: reuse getDefaultCheckFileInfoPayload
Change-Id: I7cc1aab6bac397d46c4b87e5f4f943f7a141c8e6
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-06-20 03:55:19 -04:00
Ashod Nakashian 57fe2061eb wsd: test: searchable prefix in test-server logs
Change-Id: I83cdb0f43e9681a763b964829179954e6d1b3c8a
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-01-27 08:03:18 -04:00
Ashod Nakashian b9eb4111ae wsd: http: define named HTTP status codes
This replaces the hard-coded status-code
numbers with named compile-time constants.

Change-Id: Ibe678fb2c533b29efd696e4430f5377523eeb298
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-01-24 07:58:07 -05:00
Ashod Nakashian 94978498ea wsd: test: modernize some tests
Change-Id: I8968a53f1a72ddebba276eae8211d8533964b591
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-08-02 09:24:46 -04:00
Ashod Nakashian 60e64ec8c9 wsd: test: remove COOLWebSocket from WopiTestServer
Change-Id: Ia56c2a7f34503907fb1257b966125e4d94a61645
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-08-02 09:24:46 -04:00
Ashod Nakashian 480fb7b931 wsd: move tokenizer helpers into StringVector
In an attempt to reduce the size of Util.{c,h}pp
which has grown to contain all sorts of unrelated
helpers, we move StringVector helpers into
the StringVector.{c,h}pp files.

This makes the code better organized.

Change-Id: I152f341606807ae66253415b951bc9f89b09df57
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-04-12 07:39:07 -04:00
Ashod Nakashian f4aa05cbf9 test: modernize http response in tests and simplify
And improve some test logs.

Change-Id: Ia65de99b5682abe55f677c6afca40289087f45e5
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-02-04 10:26:49 -05:00
Andras Timar f07ff8c7e0 rename: remaining lool->cool changes
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ib7d4e804bebe52dead8d53b0e0bbaed0f08bf3d0
2021-11-18 14:14:11 +01: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
Ayhan Yalçınsoy 1ef9ad4f56 Remove Poco::LocalDateTime left-overs
Change-Id: Ia847ec0f1b5602cfa0790b8702aa70e74ecec160
2020-10-24 23:52:11 +03:00
Andras Timar 0002fdfd6c fix license headers
Change-Id: I8623770b32d278a45357dc7f757fabfadd2b4af7
2020-10-01 11:56:43 +02:00
Ashod Nakashian d2d0492245 wsd: move LOOLProtocol::tokenize to Util::tokenize
The tokenizer(s) are more generic than the protocol
logic, and are used from contexts that don't involve
the protocol as such.

Change-Id: Ie8c256bf11a91e466bff794021f41603c9596a7f
2020-06-02 18:03:36 +01:00
Miklos Vajna b8bd1990aa Rework LOOLProtocol::tokenize() to return a StringVector object
The bulk of this commit just changes std::vector<std::string> to
StringVector when we deal with tokens from a websocket message.

The less boring part of it is the new StringVector class, which is a
wrapper around std::vector<std::string>, and provides the same API,
except that operator[] returns a string, not a string&, and this allows
returning an empty string in case that prevents reading past the end of
the underlying array.

This means in case client code forgets to check size() before invoking
operator[], we don't crash. (See the ~3 previous commits which fixed
such crashes.)

Later the ctor could be changed to take a single underlying string to
avoid lots of tiny allocations, that's not yet done in this commit.

Change-Id: I8a6082143a8ac0b65824f574b32104d7889c184f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89687
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-02-28 16:07:56 +01:00
Pranam Lashkari d7bc9ff2e4 killpoco: removed StringTokenizer from test directory
removed use of Poco::StringTokenizer from the test directory using LOOLProtocol::tokenize and std::vecor<std::string>

Change-Id: I20fc2e0ef0d0d8fc959fee7972aa095f2581c181
Reviewed-on: https://gerrit.libreoffice.org/82565
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-11-13 09:20:25 +01:00
mert e09b5f4226 Added Unit Test for new Watermarking feature
Change-Id: Id30015731d7ea562bfeb63fc70ffc6813945e492
Reviewed-on: https://gerrit.libreoffice.org/81674
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-11-10 23:42:47 +01:00