Skip to content

Add cram test for the examples#396

Open
Willenbrink wants to merge 14 commits into
camlworks:masterfrom
Willenbrink:cram-test-examples
Open

Add cram test for the examples#396
Willenbrink wants to merge 14 commits into
camlworks:masterfrom
Willenbrink:cram-test-examples

Conversation

@Willenbrink
Copy link
Copy Markdown
Collaborator

Previously, the examples were there but not tested and IIUC not even compiled during publishing/testing. This leads to them bitrotting. This PR adds simple cram tests that start the server from the respective example and test the output via curl.

I've only implemented the tests for the first few examples as some examples don't compile currently or require more advanced curl knowledge.

There are a few issues documented in the README.md such as:

  • The curl command might be run before the server becomes available
  • The tests all use the same port so they cannot be run concurrently
  • The logs contain timestamps which prevents reproducible tests using them

I don't think these are large issues and can be addressed in a later PR.

Comment thread dune-project Outdated
@@ -1 +1 @@
(lang dune 2.7)
(lang dune 3.0)
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should maybe wait with that change until after the next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant