Integration Tests
The purpose of integration testing in apparmor.d is to ensure the profiles are not going to break programs found in Linux distributions and Desktop Environment that we support.
Although the integration test suite is intended to be run in a Development VM, it is also deployed the GitHub Action pipeline.
Workflow
- Create a testing VM
- Run the integration tests against the testing VM
- Ensure no new logs have been raised
Getting started¶
Prepare the test environment:
Example:
Install dependencies for the integration tests
Example:
Run the integration tests
It: synchronizes the tests, unmount the shared directory, then run the tests.
Example:
Partial tests can also be run. For example the following command will only run the tests in the tests/integration/apt
directory on the ubuntu25
desktop
machine:
Create integration tests¶
All integration tests are written in Bats and are located in the tests/integration
directory. The initial tests have been generated using tldr page with the following command: