-
Notifications
You must be signed in to change notification settings - Fork 38
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
Set up CI API test framework to check database state #1880
Comments
I think for all those views, the one-fits-all approach doesn't quite work.
|
I agree that there there is not one solution for all tests. But I think for the API calls we could extend https://github.com/digitalfabrik/integreat-cms/blob/develop/tests/api/api_config.py#L6 additional parameters to check the database state. That would potentially allow us to merge the Push Content API tests with the other API tests. Alternatively, we could split between read only and writable API endpoints? In regards to front end view I think you're totally right. These are too diverse for reducing this to a common list of parameters. I'll adjust the title of the issue. |
I would suggest checking changes through models. I.e. query data into a model object and validate its fields. |
Added checks for cms_feedback table. Also need to cover tables for different feedback types, like cms_pagefeedback, cms_poifeedback etc. |
I think an existing type check might be actually enough here...
|
Motivation
In our CI API tests we only check for response codes and return values. In some cases, for example feedback, we have currently have no way of verifying if the feedback has actually been saved to the database.
Proposed Solution
Add a new parameter to to our API (and potentially other tests) that allows checking the state of the database. One option for implementing this would be to have two additional parameters in our list of tests:
Alternatives
Find better alternatives to check if a database manipulation was actually successful.
Additional Context
Design Requirements
The text was updated successfully, but these errors were encountered: