Etherpad-lite: Add database support tests in Travis-CI and DockerHub

Created on 31 Mar 2020  路  10Comments  路  Source: ether/etherpad-lite

I've built a docker container for etherpad with a few plugins and production mode enabled by default (see https://github.com/Monogramm/docker-etherpad), but more importantly it comes with a very simple test for several databases.
The overall idea is:

  1. start etherpad and a database through docker-compose with etherpad configured to use the database container
  2. download the etherpad home page and check that it is valid (check the title for instance)

The tests are done in a specific container, allowing both Travis-CI and Dockerhub to test the container. Executing the tests in Dockerhub could allow to NOT publish unstable containers (if that's wanted).
See https://docs.docker.com/docker-hub/builds/automated-testing/ for more details on this.

I think having this tests run in Travis might help to detect earlier issues like #3805.
I might try to send a PR for this if that's interesting for you and if I find the time 馃槄

docker tests

All 10 comments

Hi @madmath03, it is comforting to see that all the work we have done on making Etherpad more Docker friendly (#3542 and 6d9264cf3cd7 by @pierreprinetti) is paying off.

I might try to send a PR for this if that's interesting for you and if I find the time

This would be wonderful! We can only benefit from more automated testing.

I see that your Dockerfiles (for example this one on the development branch) are modified enough WRT upstream.

@pierreprinetti, would you be willing to work with @madmath03 to make this happen?

would you be willing to work with

Absolutely. Thank you @madmath03 for the initiative!

Scheduling for 1.8.4 (1.8.3 is going to be released in ~days).

FWIW I'm building travis testing into UeberDB too and hopefully modernizing the project a little. I hope to land this within 7 days.

It's landed, waiting on Mux to review :)

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

maybe tag should be added to this issue to not close this since #3855 will answer this.

I'm just gonna use a sledgejammer and merge my work. It has been up for review for long enough and has had 0 feedback.

@JohnMcLear why has this been closed ? I understand that you added tests in UeberDB but that doesn't mean etherpad should not test databases, or did I miss something ?

I'm happy enough with the tests running in ether/ueberdb travis.

  1. We have full integration for ueber all the way through to frontend (albeit exclusive to dirty db).
  2. We have load tests in both ueberdb repo(for all databases) and ether/etherpad-lite (again exclusive to dirty)
  3. Test coverage can get too cumbersome and take too long when you test X database on Y OS on Z browser. We're already doing Y OS and Z browser.
  4. It's more code to write/maintain that I feel the ueberdb repository covers and handles completely fine. We would be duplicating a lot of effort.
  5. It only really makes sense to implement these tests if you include a lot of data to simulate a genuine instance(ueberdb does this for MySQL). Again this bloats the project even further.

So while this test coverage might be a nice to have I think the cost of the code and the time taken to run the tests is not really required and the overall impact on the project will be negative.

That said, if someone writes the travis and test runner logic and is happy to maintain that code I'd be happy to see it merged :)

My point boils down to, we can trust ueberdb's tests to reflect on Etherpad.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Pita picture Pita  路  7Comments

kpcyrd picture kpcyrd  路  8Comments

BenBE picture BenBE  路  5Comments

Unifex picture Unifex  路  5Comments

wbt picture wbt  路  7Comments