-
Notifications
You must be signed in to change notification settings - Fork 17
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: implement e2e tests workflow #227
base: next
Are you sure you want to change the base?
Conversation
b50eafd
to
ee2c74e
Compare
Hi @huynguyen-hl . This PR is in a Draft status (and has conflicts), and has some notes about things that aren't finished, so it's not clear if you're wanting a review yet?
Can we just |
Thanks @absoludity for the early feedback. I tried using To address this, I took a different approach by using the MinIO client library to delete data from the |
I noticed that some test cases in both
This is why the E2E tests are failing. I believe we'll need a separate ticket to address this issue. |
@huynguyen-hl, this is the fix I was referring to in our last standup. I've raised PR #229 to address this issue. I suggest to merge PR #229 first. |
- name: Start E2E docker compose | ||
run: SEEDING=true docker compose -f docker-compose.e2e.yml up -d | ||
|
||
- name: Ensure IDR Service Readiness and Health |
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.
Hi @huynguyen-hl, is there a reason why we aren't using the built-in docker-compose health check functionality?
- name: Start E2E docker compose | ||
run: SEEDING=true docker compose -f docker-compose.e2e.yml up -d | ||
|
||
- name: Ensure IDR Service Readiness and Health |
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.
Same as above.
@@ -51,6 +51,52 @@ jobs: | |||
VC test suite, ./packages/vc-test-suite/coverage/coverage-summary.json | |||
UNTP Playground, ./packages/untp-playground/coverage/coverage-summary.json | |||
|
|||
- name: Start E2E docker compose | |||
run: SEEDING=true docker compose -f docker-compose.e2e.yml up -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.
Will GitHub cache the docker image between each run? If so, we need to build the image so the new functionality is present in the containers.
@@ -41,6 +41,52 @@ jobs: | |||
- name: Run tests | |||
run: yarn test | |||
|
|||
- name: Start E2E docker compose | |||
run: SEEDING=true docker compose -f docker-compose.e2e.yml up -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.
Same as above.
|
||
const execPromise = util.promisify(exec); | ||
export default defineConfig({ | ||
env: { | ||
idrBucketName: process.env.IDR_BUCKET_NAME || 'idr-bucket-1', |
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.
I'm not sure why we are diverging from the existing environment variable names for the IDR services.
What type of PR is this? (check all applicable)
Description
This PR sets up Cypress E2E tests to run in both the
Build and Test
andRelease
workflows. The tests will be triggered whenever:main
branch (release).next
branch.Steps added to run E2E tests:
In this PR, Iβve updated the
resetData
function to use the MinIO client library for deleting data in theidentity-resolver-service-object-store service
instead of thefs
library for file system interactions. Additionally, Iβve renamed the function toclearObjectStore
for better clarity. This removes the need to manually delete files or folders that are bind-mounted by theidentity-resolver-service-object-store
Docker Compose service, which would otherwise lead to a file system permission issue. Since the GitHub Actions environment runs under therunner
user while the bind-mounted files and folders are owned byroot
, direct deletion is not possible.Cypress E2E tests run successfully in a local environment because we use the same user (which has the highest privileges). However, if a different user were used locally, the same issue would occur.
Mobile & Desktop Screenshots/Recordings
Testing E2E pipeline in Github personal account:
Added tests?
Added to documentation?