Skip to content

Split tests to add common code to api repo #347

Closed
@mmulholla

Description

@mmulholla

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done ✅

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions