-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use dockerized Skosmos for Cypress tests #1509
Conversation
a9898cd
to
e7b2330
Compare
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## skosmos-3 #1509 +/- ##
============================================
Coverage 70.09% 70.09%
Complexity 1642 1642
============================================
Files 32 32
Lines 4314 4314
============================================
Hits 3024 3024
Misses 1290 1290 ☔ View full report in Codecov by Sentry. |
…erwise interferes with cypress testing
e7b2330
to
7f57250
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
I merged #1496 into skosmos-3, then rebased this PR branch on top of current skosmos-3 to clean up the commit history and diff. Now this PR shows only actual changes w.r.t. current skosmos-3. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When running the command ./init_containers.sh
, I encountered an error:
Error response from daemon: Conflict. The container name "/skosmos-fuseki-cache" is already in use by container "0fcc35ef7ecc3336b294cb2e577de388e77e24885a866cf2a88c1b1489b9314c". You have to remove (or rename) that container to be able to reuse that name.
Waiting for Fuseki to get ready
...waiting...
...waiting...
...waiting...
I removed the previous containers (deleting just the Varnish container would likely have sufficed), after which all runs went smoothly. I am wondering whether this situation could be considered problematic or not. I was considering how much effort it would be to implement some adjustment that automatically removes a conflicting container. On the other hand, manually removing the conflicting container and re-running the script is not a significant task. In my opinion, both approaches are acceptable; having automation or having the tester manually remove the conflicting container.
However, the issue was a one-time occurrence and cannot be reproduced anymore, so there is no need to focus on it any further.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The execution of PHPUnit tests was successful. Of course, the tests reported errors, but that's okay, and the passing of tests is not within the scope of this PR.
!! The errors in PHPUnit tests were my own mistake. I forgot to run php composer update - once again :-D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Cypress tests are working well, meaning that the modified settings are functioning and the http://localhost:9090 URL is responding correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything seems to be working well. In think we can proceed with the merge.
Reasons for creating this PR
We want to run Cypress tests in a standard environment. See #1508
Link to relevant issue(s), if any
Description of the changes in this PR
tests/docker-compose.yml
that extendsdockerfiles/docker-compose.yml
and overrides the skosmos configuration, so that Skosmos in the container uses the sametestconfig.ttl
configuration as the PHPUnit teststestconfig.ttl
(otherwise links aren't working in the skosmos container)After these changes, I can successfully run both the PHPUnit and Cypress tests locally. Instructions for running the tests:
Set up the Docker containers:
Run the tests normally:
After running the tests, the containers can be shut down like this:
Known problems or uncertainties in this PR
Wiki documentation for running PHPUnit and Cypress tests should be updated when/after merging this.
This PR doesn't include running Cypress tests under GitHub Actions CI; we have a draft PR #1479 about that, but it needs some more work that is best done after this PR is merged.
Checklist
.sr-only
class, color contrast)