Skip to content
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

feat: e2e tests #55

Merged
merged 13 commits into from
Jan 11, 2025
Merged

feat: e2e tests #55

merged 13 commits into from
Jan 11, 2025

Conversation

alexey-yarmosh
Copy link
Member

Fixes #47

Local run of e2e tests from that repo was not added, as it would add a lot of mess to support editable local env vars (e.g. specifying DIRECTUS_URL=http://localhost:18055 instead of DIRECTUS_URL=http://127.0.0.1:18055).
Tests still can be executed locally from https://github.com/jsdelivr/globalping-dash-directus. Since those 2 repos always goes hand in hand, I think that is ok to run e2e tests from there. That PR adds execution on CI.

@alexey-yarmosh alexey-yarmosh force-pushed the e2e-2 branch 2 times, most recently from 5385147 to a310e07 Compare January 3, 2025 17:40
@MartinKolarik
Copy link
Member

So when working on something just in this repo, to run the test, we'd have to push the changes, create a matching branch in the other repo, and then run it from there? Can't we do something like in the probe repo, where config files with 2e2 in the name are copied to the image?

@alexey-yarmosh
Copy link
Member Author

So when working on something just in this repo, to run the test, we'd have to push the changes, create a matching branch in the other repo, and then run it from there?

If your version of globalping-dash is already running on port 13010, it will be used by e2e tests, without starting a new instance. So you can just run e2e tests from master branch of globalping-dash-directus.

Can't we do something like in the probe repo, where config files with e2e in the name are copied to the image?

We can, but in requires at least 2 .env files, to update .env and .env.e2e respectively. Also when e2e test fails you most likely want to debug and run tests with browser window. And e.g. my IDE extension can't find test files hidden in test/e2e/globalping-dash-directus subdirectory. So I'll go to globalping-dash-directus and execute from there anyway.

It will also require some updates to the init scripts, to support .env files override, and I am not sure all that complications will make e2e tests easier to run.

@MartinKolarik
Copy link
Member

If your version of globalping-dash is already running on port 13010, it will be used by e2e tests, without starting a new instance. So you can just run e2e tests from master branch of globalping-dash-directus.

Ok that seems fine then, just document it later in #53.

@MartinKolarik MartinKolarik merged commit 03043a4 into master Jan 11, 2025
4 checks passed
@MartinKolarik MartinKolarik deleted the e2e-2 branch January 11, 2025 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add e2e tests
2 participants