-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
09046de
commit dfad7a7
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Docker Image Structural Testing | ||
The configuration file `test/config.yaml` defines various "structural" checks to perform on the docker image created by `../Dockerfile`. | ||
|
||
The test require the use of the [container-structure-test](https://github.com/GoogleContainerTools/container-structure-test) from Google. | ||
|
||
Follow their documentation to install. | ||
|
||
## Usage | ||
Generate your docker image using your preferred method e.g. | ||
```shell | ||
docker build -t myimage . | ||
``` | ||
|
||
To run the tests against the image, run the following: | ||
```shell | ||
container-structure-test test --image myimage --config tests/config.yaml | ||
``` |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
schemaVersion: 2.0.0 | ||
|
||
commandTests: | ||
- name: "say hello world" | ||
command: "bash" | ||
args: | ||
- -c | ||
- | | ||
echo hello && | ||
echo world |