Repository navigation
Add swagger schema test with tagged test cases - #3528
Merged
Merged
Conversation
Member
|
Great stuff. Sounds good, so you could adjust https://github.com/DefectDojo/django-DefectDojo/blob/dev/docker/entrypoint-unit-tests-devDocker.sh and https://github.com/DefectDojo/django-DefectDojo/blob/dev/docker/entrypoint-unit-tests.sh to reflect the broken / non-broken stuff. |
valentijnscholten
approved these changes
Jan 4, 2021
madchap
approved these changes
Jan 17, 2021
Closed
9alexx3
pushed a commit
to 9alexx3/django-DefectDojo
that referenced
this pull request
Aug 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a first version of the test suite for the swagger schema. This is the test used to report #3342. I have divided the test cases into two categories. The test that are currently succeeding and the tests that are failing. The later have been tagged as
broken. By doing so, we can run the first category by callingpython manage.py test dojo.unittests.test_swagger_schema.py --exclude-tag brokenand the second category by calling
python manage.py test dojo.unittests.test_swagger_schema.py --tag brokenIdeally, this test would be implemented in the current pipeline first, by adding
--exclude-tag brokento the command called by the job in charge of running the unit tests then by adding a new job that would run only that test but with--tag brokenand that job would be allowed to fail. By doing so, we wouldn't have a pipeline that fails until we correct all the errors in the schema but we would still ensure that new features are not breaking the schemas that are valid.As we correct the tests that are broken, we only need to remove the tags so that the corresponding test case will be executed by the standard pipeline.
I don't know if my explanation is clear enough, let me know what you think of this approach :)
Note Do not merge already as the pipeline needs to be modified accordingly