summaryrefslogtreecommitdiff
path: root/test/UnitOAuth.cpp
AgeCommit message (Collapse)AuthorFilesLines
2020-03-14wsd: test assertion macrosAshod Nakashian1-2/+2
Because the new-style tests are intrustive, the exception that CppUnit throws on assertion failures is caught and processed with the application logic, which is far from ideal, because it's very difficult to find the cause of failure. What we'd like is a way to control what happens when an test assertion fails, such that we can properly log/print the failure, and even break in the debugger. The new macros allow us to control the behavior at compile-time and have added flexibility. For now, they log an assertion failure before invoking the CPPUNIT macro, and support a compile-time directive to assert, which is useful for breaking in the debugger. Change-Id: If464ba246e3ec747f31496a4215cb73ef735dfaf Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87625 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-12-13WopiTestServer: make members privateMiklos Vajna1-1/+1
Change-Id: If042fab5b69faf7c7dff975a95810cb96d8f02b0
2017-12-20loplugin:includeformPranav Kant1-6/+6
Change-Id: Ib62a7aa61062f00698aa3e8a144438de5c57e53d
2017-10-26tdf#99744 SaveAs: Reimplementation of the PutRelativeFile going through Kit.Jan Holesovsky1-5/+0
This is necessary so that changing of the file type works. Includes a unit test. Change-Id: Id01d44e555b6bac1002ff950de461fd330602f63
2017-09-27Speed-up the WOPI tests.Jan Holesovsky1-5/+8
Change-Id: Ib61c5b90703e4266dbad935cd632b8be50a4ac44 Reviewed-on: https://gerrit.libreoffice.org/42880 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-09-27WopiTestServer: Share more code.Jan Holesovsky1-13/+5
Change-Id: Ied539169f96608adb7095682bd8f0b7a70d28491 Reviewed-on: https://gerrit.libreoffice.org/42879 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-09-27PutFile ext: X-LOOL-WOPI-IsModifiedByUser unit test.Jan Holesovsky1-6/+7
Change-Id: I0b1ffc74dbbc771f0dcb68f87d46af3ba469ae9e Reviewed-on: https://gerrit.libreoffice.org/42855 Reviewed-by: pranavk <pranavk@collabora.co.uk> Tested-by: pranavk <pranavk@collabora.co.uk>
2017-09-27Separate the fake wopi server to an own class.Jan Holesovsky1-86/+20
Change-Id: Ibb1b06c491be0065aa12a05a43959165d6c86398 Reviewed-on: https://gerrit.libreoffice.org/42853 Reviewed-by: pranavk <pranavk@collabora.co.uk> Tested-by: pranavk <pranavk@collabora.co.uk>
2017-08-17Fix various nitpicks.Jan Holesovsky1-17/+18
Change-Id: I41fe795bc1ea7c73527c7e1183de7098517bad7a
2017-08-17access_header: Pass the access_header around + unit test.Jan Holesovsky1-27/+53
Change-Id: I5d6d93e289d8faceda59deae128e8124a0193d95 Reviewed-on: https://gerrit.libreoffice.org/41243 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Reviewed-by: pranavk <pranavk@collabora.co.uk> Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-08-09wsd: Fix the OAuth unit test.Jan Holesovsky1-83/+109
Trying to combine the Poco's http server together with our polling loop leads only to problem; so instead let's introduce a hook where we can do the WOPI serving directly in the unit test. Change-Id: Id3fec6ff93c3ad652aa4e0fc6309c5b7639728cb
2017-08-03wsd: OAuth token passingHenry Castro1-0/+149
MS-WOPI: "The following HTTP header MUST be included in all WOPI requests." "Authorization "Bearer" and <token>" Change-Id: Ie5327286e93b86a49a0248ff5886bf3ea99df768