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

Split tests to add common code to api repo #347

Closed
mmulholla opened this issue Feb 16, 2021 · 1 comment
Closed

Split tests to add common code to api repo #347

mmulholla opened this issue Feb 16, 2021 · 1 comment
Assignees

Comments

@mmulholla
Copy link
Contributor

mmulholla commented Feb 16, 2021

The code written for library tests which generates random devfile content can also be applied to the api repo, and largely replace the current tests.

First step is to port what tests currently run and set up the framework for sharing code. Once this is in place the tests can be extended over time to cover the full schema. The split will be as follows

api repo:
tests/v200/apiTest/api-test.go - the go test
tests/v200/utils/api/test-utils.go - test utilities specif for api tests, for example reading and compiling the schema file.
test/v200/utils/common/test-utills.go, command-test-utils.go etc. - test utilites to generate valid devfiles . Shared by both sets of tests

as a group this is sufficient to run the tests in the api repo and not include any references to, or code required, by library tests.

library repo:
tests/v2/libraryTest/api-test.go - the go test
test/v2/utils/library/test-utils.go, command-test-utils.go - tests utilites specific to the library, for example test which update the devfile and verify the content is as expected.

these test require use of test/v200/utils/common/ from the api repo.

@michael-valdron
Copy link
Member

Issue is stale, closing for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done ✅
Development

No branches or pull requests

2 participants