Container Structure Test
No Change
adopt
Container Structure Test provides a powerful framework to validate the structure of a container image. These tests can be used to check the output of commands in an image, as well as verify metadata and contents of the filesystem.
If you are building containers then this is a critical tool.
Tests are defined in a YAML file and then run via
container-structure-test test --image <image> --config <testfile>
There are three types of tests that can be performed:
- Command Tests - Execute a command and check its output
- File existence tests - Check a file is or is not present
- File content tests - Check a file has or does not have certain content
- Metadata test - Check that the metadata of the container is correct