Add integration tests
What does this MR do?
This change adds integration tests that can be run from a developer workstation. It includes the following scripts:
-
script/setup
: install dependencies and starts background clair vb database usingdocker-compose
-
script/test
: a script that can be used to run the unit tests, integration tests or both.
For more info read https://github.com/github/scripts-to-rule-them-all and https://gitlab.com/groups/gitlab-org/threat-management/-/wikis/container-security.
A test is included that attempts to shell out to rpm
that will fail on a FIPS enabled host.
A gitlab-runner
with the tag fips
is available to run this test suite to ensure that it fails when the Docker image does not meet FIPS compatibility.
The code in this MR was extracted from !68 (closed).
What are the relevant issue numbers?
Does this MR meet the acceptance criteria?
-
Changelog entry added -
Documentation created/updated for GitLab EE, if necessary -
Documentation created/updated for this project, if necessary -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Job definition updated, if necessary -
Conforms to the code review guidelines -
Conforms to the Go guidelines -
Security reports checked/validated by reviewer
Edited by mo khan