Page MenuHomekolab.org

Run kolab tests in CI
ClosedPublic

Authored by mollekopf on Jul 12 2022, 4:47 PM.

Details

Summary

This allows us to run kolab4 tests in CI (tested on centos8).

The test is executed via ci/Makefile (all target)

Some of the changes include:

  • Configurable ssl certificate
  • Do not persist the node modules
  • swoole needs to be built before the rest
  • Install kolab from the new mirror
  • Buildkit seems to be the reason for the centos7 problems
  • Various test fixes, and skip tests that don't currently pass
  • docker-compose is now a plugin

Diff Detail

Repository
rK kolab
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

mollekopf requested review of this revision.Jul 12 2022, 4:47 PM
mollekopf created this revision.
mollekopf updated this revision to Diff 10589.Jul 12 2022, 4:49 PM
mollekopf edited the summary of this revision. (Show Details)

Rebased on master

mollekopf added a reviewer: Restricted Project.Jul 12 2022, 4:50 PM
machniak requested changes to this revision.Jul 13 2022, 8:16 AM
machniak added a subscriber: machniak.
machniak added inline comments.
docker/tests/lint.sh
16 ↗(On Diff #10589)

We also have npm run lint for js/css.

src/tests/Browser/ErrorTest.php
24 ↗(On Diff #10589)

I'm sure this will fail for me. These two lines of code should be replaced with ->assertErrorPage(404), it does the same in a case-insensitive way.

34 ↗(On Diff #10589)

Same as above.

src/tests/Feature/Backends/IMAPTest.php
20 ↗(On Diff #10589)

If it fails here, then maybe we need to wait before we start testing, I assume the IMAP is not yet ready with the seeded mailboxes.

src/tests/Feature/Console/User/StatusTest.php
33 ↗(On Diff #10589)

Is kolab4 worker working? It is responsible for creating ldap/imap entries and verification. Or maybe it needs more time? Some tests assume all jobs created while seeding database have been processed.

This revision now requires changes to proceed.Jul 13 2022, 8:16 AM
mollekopf updated this revision to Diff 10619.Jul 14 2022, 8:53 AM
mollekopf marked 2 inline comments as done.
mollekopf edited the summary of this revision. (Show Details)

Addressed comments and fixed a lint failure in the mollie controller.

mollekopf marked an inline comment as done.Jul 14 2022, 8:55 AM

I removed skipci from the previously failing imap tests. I can't reprodcuce at the moment so it's probably a race condition that I'll look into once I can reproduce.

mollekopf updated this revision to Diff 10622.Jul 14 2022, 8:57 AM

Fixed assertErrorPage

mollekopf updated this revision to Diff 10625.Jul 14 2022, 8:58 AM

Try again

mollekopf updated this revision to Diff 10703.Tue, Aug 2, 1:58 PM

Updated from branch

mollekopf retitled this revision from docker-compose is now a plugin to Run kolab tests in CI.Tue, Aug 2, 2:08 PM
mollekopf edited the summary of this revision. (Show Details)
machniak accepted this revision.Tue, Aug 2, 2:54 PM

Two comments, looks good otherwise.

src/.env.example
178

I'm not sure about storing more options like these in the same file. We have already some other options that aren't used by Kolab4 code. A separate file would be better, but we can handle that separately, I guess.

src/app/Providers/Payment/Mollie.php
345 ↗(On Diff #10703)

In fact we should probably try/catch instead to do what Mollie recommends and return 200.

This revision is now accepted and ready to land.Tue, Aug 2, 2:54 PM
Closed by commit rK4be84ccea0a3: Configurable ssl certificate (authored by mollekopf, committed by Christian Mollekopf <mollekopf@apheleia-it.ch>). · Explain WhyTue, Aug 2, 3:34 PM
This revision was automatically updated to reflect the committed changes.
mollekopf added inline comments.Tue, Aug 2, 4:19 PM
src/.env.example
178

I agree this is becoming a concern, there's a relatively wild mix of options for kolab4 and docker-compose.

src/app/Providers/Payment/Mollie.php
345 ↗(On Diff #10703)

I created a diff for it.