Commit Graph

51 Commits (52f8fc9ba31a12d461c5dedf05dbea28952052c4)

Author SHA1 Message Date
webzwo0i ceb09ce99a
security: Support proxy with rate limiting and include CI test coverage for nginx rev proxy (#4373)
Previously Etherpad would not pass the correct client IP address through and this caused the rate limiter to limit users behind reverse proxies.  This change allows Etherpad to use a client IP passed from a reverse proxy.

Note to devs: This header can be spoofed and spoofing the header could be used in an attack.  To mitigate additional *steps should be taken by Etherpad site admins IE doing rate limiting at proxy.*  This only really applies to large scale deployments but it's worth noting.
2020-10-01 10:39:01 +01:00
John McLear 90adc50289
tests: Include some plugins in tests (#4339)
This PR introduces testing of plugins from the ether/ organization on Github.  Each plugin is added into ``.travis``.  Frontend plugins tests are run exclusive to core tests.  Backend runs both core and plugins with core.

Including frontend core tests with plugin tests caused the session to overrun causing errors.
2020-09-26 19:41:33 +01:00
John McLear 13252c955c include hash auth in tests 2020-09-22 11:12:24 +01:00
webzwo0i 1b6a9d8be0
tests: Fix frontend tests (#4188), ugly work around for "Pad never loaded" (#4200)
* remote_runner.js: fix drain call (cf.
https://github.com/caolan/async/blob/master/CHANGELOG.md#breaking-changes)

* dont wait 30 seconds after remote_runner.js returned

* timeout frontend tests after 9.5 minutes to prevent travis from silently stop them

* log when not all tests finished

* prevent killTimeout to happen after last test

* log server messages to console

* remote_runner will take some time to setup sl, so this second is not necessary

* dont write to global mocha variable

* mochas `test end` event is not called when a before/beforeEach-hooks
failed, so we should only use pass/fail/pending-hooks for logging.
also some cruft removed

* pass test in `pending`-event handler

* remove some more cruft in tests/frontend/runner.js

* frontend tests: clarify why stats.tests and total differ

* move killTimeout to pass/fail/pending instead of `test end` to guarantee that it is run

* delete killTimeout on test end to prevent misleading log message

* unused variable

* fix regex

* unlikely edge case

* ensure `allowed test duration exceeded` message is printed for the last runner

* get rid of jquery.iframe.js, currently no support for IE<9

* retry up to 3 times when pad could not be loaded

* Call the logging code in stopSauce in a callback for `browser.quit()`.
This should fix cases like
https://app.saucelabs.com/tests/cb8225375d274cbcbb091309f5466cfd
Travis received all the logs and remote_runner.js exits, but there never
is a DELETE command for webdriver.
2020-07-28 19:57:33 +01:00
John McLear 40014d8230
Rate limit Socket IO communication - WIP (#4036)
Includes settings
    Includes i18n
    Includes a nice notification
    Disconnects on rate limit
    Includes feeding into metrics/stats
    Include console warn to server console.
2020-07-19 22:44:24 +01:00
John McLear 7b0fd4fb29
Bugfix / tests: Travis use LibreOffice PPA and fix import /export tests for good. (#4166)
Just final bits of test coverage for import/export of LibreOffice.  It turns out Travis by default installs an old LO that doesn't support PDF import.  To remedy that I use the LO PPA and also strict install the PDF import support.

Still to do in a future date is check LO exported contents includes expected strings, for now it just checks output length looks sane.
2020-07-16 10:46:45 +01:00
John McLear 8ae823032d
Bugfix: Travis parse (#4164) 2020-07-14 18:47:38 +01:00
John McLear ab8320d15b
WIP - Test Coverage: Import & Export include LibreOffice Test Coverage (#4163)
Runs on Travis
Will only run locally is ``allowAnyoneToImport`` and ``soffice`` or ``abiword`` is set.
2020-07-14 18:44:53 +01:00
John McLear 3bd81e6d01
Libreoffice travis (#4159)
* remove cruft..  ugh

* housekeeping: close stale issues

* testing installing LO first
2020-07-10 16:13:06 +01:00
John McLear 3e78b79d9d
tests: no sauce tunnel on ALL test run
Speeds up tests and removes overhead
2020-06-08 17:18:22 +01:00
John McLear 5e887c02a8
tests: Travis conditional only run frontend tests if it's not a fork. (#4097) 2020-06-08 13:51:57 +01:00
John McLear 8f8a949155 tests: travis config 2020-06-08 11:45:03 +00:00
John McLear 9b875d934f
tests: using travis conditions to decide if front end tests should be run or not. (#4094) 2020-06-08 12:39:20 +01:00
John McLear f7e73515cd tests: use sed to modify settings for loadTest 2020-05-30 20:02:40 +00:00
John McLear 2844224acb tests: backend tests tweak 2020-05-30 18:22:24 +00:00
John McLear add3b23f66 tests: load testing into core 2020-05-30 18:17:33 +00:00
John McLear 82ee1da8e7
tests: Disable all Travis Caching (#4063) 2020-05-29 21:42:44 +01:00
John McLear c6b5846172
tests: Fix backend testing which were always partially broken due to cache (#4053) 2020-05-29 13:26:34 +01:00
John McLear d8e067a5f9
tests: Resolve Gateway timeout during automated tests by adding delay after minify request
* Remove npm cache from Travis, this was causing a world of pain.
* Remove the broken line attribute tests.
* Do a HTTP get against Etherpad to begin minification.
* Wait 10 seconds after minification before running tests.
2020-05-29 12:28:31 +01:00
John McLear b1b181927d Revert "Removing ep_test_line_attrib include"
This reverts commit 9bca865b4f.
2020-05-28 12:33:57 +00:00
John McLear f775096696 Revert "Warning about Travis Cache"
This reverts commit 5208ae5ee6.
2020-05-28 12:33:44 +00:00
John McLear 5208ae5ee6
Warning about Travis Cache
Intentionally committing to develop.  We can probably revert these two commits.
2020-05-28 11:54:34 +01:00
John McLear 9bca865b4f
Removing ep_test_line_attrib include
Intentionally committing directly to develop.  Removing ep_test_line_attrib because it's breaking other tests from running.

The weird thing is even when this is removed from other branches it appears to be included.  Hopefully committing directly to develop will make things work.
2020-05-28 11:37:10 +01:00
John McLear 93180c287b
tests: in Travis, also run the backend tests
This change introduces automatic execution of the backend tests in Travis.

Implements #2351.
2020-04-03 03:27:05 +02:00
John McLear 61f0b5db0b tests: enable sauce labs tests again 2020-03-23 23:51:51 +01:00
Pierre Prinetti 92f07a544b ci: test basic application response of the docker build
Note by muxator:
This commit introduced a copied & modified version of the testing files
loadSettings.js and pad.js.

It's Christmas night, and we want to shipt this feature, so I merged it anyway,
adding a note in both the original and copied files so that hopefully someone
in the distant future is going to merge them back again.
2019-12-25 00:28:38 +01:00
Pierre Prinetti 69fd393708 ci: test the Dockerfile
Add a `Test Dockerfile` job to Travis that checks the `docker build` exit
code.
More useful tests can be added later.
2019-12-25 00:28:38 +01:00
muxator 5b4bca2c6e ci: move the existing test under a jobs section, so we can add others later
In the next commit Pierre will start adding tests for the docker build, and this
lays out the structure for doing that.
No functional changes.

The relevant TravisCI docs that motivates moving under a jobs section is
https://docs.travis-ci.com/user/build-matrix/

> There are two ways to specify multiple parallel jobs (what we call the build
> matrix) with a single .travis.yml configuration file:
>
> * combine a language-and-environment dependent set of configuration options to
>   automatically create a matrix of all possible combinations. This is called
>   matrix expansion. For example, the following configuration produces a build
>   matrix that expands to 8 individual (2 * 2 * 2) jobs
>   [...]
>
> * specify the exact combination of configurations you want in jobs.include.
>   For example, if not all of those combinations are interesting, you can
>   specify just the combinations you want
2019-12-25 00:28:38 +01:00
muxator bf0bb58c70 ci: no need to include java
The dependency on java was introduced in 2012 (c021cf52d8) to start
Sauce-Connect from sauce labs.

Probably at the time it was a runtime dependency, but it is no longer the case
today. It is possible that java was already not needed when db003a1460 changed
from downloading Sauce-Connect-latest.zip to sc-latest-linux.tar.gz.

Moreover, I am quite sure tests/frontend/travis/sauce_tunnel.sh no longer works
today, because tests/frontend/travis/sauce_tunnel.sh downloads from an url that
gives HTTP/404 now: sc-latest-linux.tar.gz if no longer a valid file name, we
would need to explicitly download a specific version.
2019-12-25 00:28:38 +01:00
muxator cffa3e0a5d ci: trivial reformatting in preparation for next commits.
This is just needed to slim up the diffs for the next commits.
Non functional changes.
2019-12-25 00:28:38 +01:00
anoy c0e257835c updated nodejs version for travisci 2018-08-27 10:52:22 +02:00
Robert Helmer 59ba183c82 Issue #2948 - disable sauce labs frontend tests until they are working. (#3230) 2017-07-27 17:41:18 -03:00
Luiza Pagliari 520f257ed1 [chore] Use helper plugin when running tests on Travis
This plugin allows us to test code related to plugins, like testing
issues that only happen when we have plugins using line attribs, for
example (see #3118).
2017-01-12 13:04:32 -02:00
Marcel Klehr e72511349d Merge branch 'pr/1789' into develop
Conflicts:
	.travis.yml
2013-10-28 12:20:10 +01:00
Chia-liang Kao 837d3bcfbf Update sauce key 2013-06-15 11:16:40 +08:00
Thomas Grainger fe0104f336 Use rev-parse to get short commit hash
Also ensures unique
2013-05-31 03:05:58 +02:00
Peter 'Pita' Martischka 97bbff05d4 Let travis use sauce labs key of the etherpad user 2013-05-04 13:14:39 +01:00
John McLear 0b2e1a0c31 Update .travis.yml 2013-04-15 17:33:41 +02:00
John McLear a670158e78 Update .travis.yml 2013-04-15 17:33:20 +02:00
Peter 'Pita' Martischka a7e6c6b0ab encrypted the key again, please travis accept this 2012-11-19 14:52:45 +01:00
Peter 'Pita' Martischka a99ff139c9 updated sauce_key env for new repo 2012-11-17 11:46:49 -08:00
Peter 'Pita' Martischka ac3ff4f66d Only test in node.js 0.8 2012-11-03 16:07:32 +00:00
Peter 'Pita' Martischka 0fd6051f52 test in different browsers 2012-11-03 15:55:14 +00:00
Peter 'Pita' Martischka dfe3b8d17f test also with node.js v0.6 + notify irc about test results 2012-11-03 14:36:59 +00:00
Peter 'Pita' Martischka 67f12493ed don't silent the full install deps step 2012-11-01 23:48:53 +00:00
Peter 'Pita' Martischka c8dfa6d7ae less noise 2012-11-01 23:46:04 +00:00
Peter 'Pita' Martischka 82dfb2df21 run test lib for a minute in sauce with firefox 2012-11-01 22:17:31 +00:00
Peter 'Pita' Martischka bbab713c70 fixed travis yml 2012-10-30 21:04:22 +00:00
Peter 'Pita' Martischka 23c5cd83b9 travis, will you like this? 2012-10-28 18:51:05 +00:00
Peter 'Pita' Martischka c021cf52d8 download and start the sauce connector in travis 2012-10-28 16:48:51 +00:00