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

Integration Domains: add tests to make sure Domains API works #55

Merged
merged 2 commits into from
Sep 6, 2023

Conversation

f-trivino
Copy link
Collaborator

This commit implements unit tests to make sure the app Domain model, adapter, and view works well. Initially using factory-boy and Faker libraries for creating the test data.

Coverage: test domain str() method and adapter class so that the values for each of the fields in the serializer match the values for each of the fields on the model. Views unit tests are also added to make sure the domains API endpoints (GET, POST, PUT, and PATCH) work as expected.

@f-trivino f-trivino force-pushed the domains-unit-tests branch 3 times, most recently from afac279 to c7a4b2b Compare June 16, 2023 15:45
@f-trivino f-trivino force-pushed the domains-unit-tests branch 20 times, most recently from 2802be3 to 0999f5b Compare August 9, 2023 10:42
@f-trivino f-trivino force-pushed the domains-unit-tests branch 6 times, most recently from e3828e0 to 13458b9 Compare August 22, 2023 08:52
@f-trivino f-trivino force-pushed the domains-unit-tests branch 6 times, most recently from 776820d to f82f286 Compare August 23, 2023 15:34
@f-trivino
Copy link
Collaborator Author

@flo-renaud this one is ready to be reviewed.

Dockerfile.test Outdated Show resolved Hide resolved
This commit implements unit tests for the Integration Domains app
to make sure the adapter (serializer), model, and view classes work
as expected. The unit tests are using factory-boy library for
creating the test data.

Coverage: test domain __str__() method and adapter class so that
the values for each of the fields in the serializer match the
values for each of the fields on the model. Views unit tests are
also added to make sure the domains API endpoints (GET, POST,
and DELETE) work as expected.

Signed-off-by: Francisco Trivino <[email protected]>
This commit adds more packages and system dependencies to the Dockerfile.test,
now Containerfile.test, as well as running coverage and domains unit tests as
entrypoint. This is used to test the image before uploading to quay.io.

Signed-off-by: Francisco Trivino <[email protected]>
Copy link
Collaborator

@antoniotorresm antoniotorresm left a comment

Choose a reason for hiding this comment

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

LGTM

@antoniotorresm antoniotorresm merged commit 5b10e47 into freeipa:main Sep 6, 2023
3 checks passed
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.

2 participants