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

Add seed data and schemas to CLI e2e app template #19226

Merged
merged 6 commits into from Jan 16, 2024

Conversation

innerdvations
Copy link
Contributor

@innerdvations innerdvations commented Jan 15, 2024

What does it do?

Adds a complex test template for CLI e2e tests

Why is it needed?

  • needed to validate that the data transfer tool used for test setup is trustworthy by verifying every record expected
  • can be used by CLI tests as a quick way to have every Strapi data structure available

How to test it?

  • run yarn test:cli and the test app should generate with this structure (content types)
  • run the cli-e2e/scripts/dts-import.js targeting the data/complex.tar.gz and it should load into the project

Note: the automatic seeding will come in a later PR with a utility function for tests to use to call the import script

Related issue(s)/PR(s)

@innerdvations innerdvations self-assigned this Jan 15, 2024
@innerdvations innerdvations added source: tooling Source is GitHub tooling/tests/ect pr: enhancement This PR adds or updates some part of the codebase or features labels Jan 15, 2024
@innerdvations innerdvations changed the title Add schemas to CLI e2e app template Add seed data and schemas to CLI e2e app template Jan 16, 2024
@innerdvations innerdvations marked this pull request as ready for review January 16, 2024 11:51
@@ -38,7 +38,7 @@ const createSourceProvider = (filePath) =>
createLocalFileSourceProvider({
file: { path: resolve(filePath) },
encryption: { enabled: false },
compression: { enabled: false },
Copy link
Member

Choose a reason for hiding this comment

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

You'll need to update the fs utils (and add an unzip step in the read chain)

Copy link
Member

@Convly Convly left a comment

Choose a reason for hiding this comment

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

Can you do the same decompression step for the readdir too?

@Convly Convly merged commit acf3e3b into v5/main Jan 16, 2024
23 checks passed
@Convly Convly deleted the cli-tests/add-template-and-seed-data branch January 16, 2024 14:07
@echoes-hq echoes-hq bot added the echoes/type: maintenance/testing For tests written to support improved automation QA label Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
echoes/type: maintenance/testing For tests written to support improved automation QA pr: enhancement This PR adds or updates some part of the codebase or features source: tooling Source is GitHub tooling/tests/ect
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants