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

Run E2E tests from correct working directory #1370

Merged
merged 1 commit into from
Mar 31, 2022

Conversation

rmunn
Copy link
Collaborator

@rmunn rmunn commented Mar 31, 2022

Description

E2E tests assume they are being run from root of repo, not from docker directory, so they need working_directory: . in the GHA workflow file.

Fixes #1369.

Type of Change

Only keep lines below that describe this change, then delete the rest.

  • Bug fix (non-breaking change which fixes an issue)

@github-actions
Copy link

github-actions bot commented Mar 31, 2022

Unit Test Results

    1 files      1 suites   14s ⏱️
373 tests 373 ✔️ 0 💤 0

Results for commit 39a814e.

♻️ This comment has been updated with latest results.

Copy link
Collaborator

@megahirt megahirt left a comment

Choose a reason for hiding this comment

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

Great thanks, @rmunn This should fix the issue that @longrunningprocess identified with E2E tests not running on integrate-and-deploy

E2E tests assume they are being run from root of repo, not from `docker`
directory.
@megahirt megahirt force-pushed the chore/fix-e2e-test-working-directory branch from 02cd3b1 to 39a814e Compare March 31, 2022 03:32
@rmunn rmunn merged commit d9b0ec2 into develop Mar 31, 2022
@rmunn rmunn deleted the chore/fix-e2e-test-working-directory branch March 31, 2022 03:38
@longrunningprocess
Copy link
Contributor

Thanks for taking a look at this and I'll pull this into my branch on my next rebase. I'd like to note however, had this followed convention and put those commands behind a make target like make e2e or something, we could've avoided this. Most likely in the make target there would've been a cd .. and then all the necessary commands needed to make it work.

@longrunningprocess
Copy link
Contributor

longrunningprocess commented Mar 31, 2022

actually looking at the Makefile, I see there are still targets in there... maybe we should've tweaked those or added a new one make e2e-tests-new if the old one is still being used anywhere?

@megahirt
Copy link
Collaborator

Yes, I still want to keep the old ones in make e2e-tests as I can still run those on my machine locally. Yes, we should have a make target, probably make playwright-tests. Or we could rename the old ones to make protractor-tests and the new ones be make e2e-tests.

Yes, it would be better to use Make in the build script. There's a number of places where we aren't doing that since there are a few small differences - but I think those could be ironed out.

My goal after the lfnext branch is merged, is to move the Makefile to the repo root. No more cd docker for Make commands.

@longrunningprocess
Copy link
Contributor

ok, that sounds good

@rmunn
Copy link
Collaborator Author

rmunn commented Mar 31, 2022

Thanks for taking a look at this and I'll pull this into my branch on my next rebase. I'd like to note however, had this followed convention and put those commands behind a make target like make e2e or something, we could've avoided this. Most likely in the make target there would've been a cd .. and then all the necessary commands needed to make it work.

Unfortunately, the way Playwright's webServer config works is that it registers the process ID of the command that runs, and kills that process ID when it's done — which means that I couldn't use make e2e-tests (I tried that first). I'm not always good at concisely explaining all the technical details behind my decisions, which means that sometimes I decide not to write an essay and to just do things; sorry about that.

@longrunningprocess
Copy link
Contributor

gotcha, thanks for at least trying!

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.

bug: Integration E2E tests running from wrong directory
3 participants