-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
How do we know after building a container that it results in an image that starts properly and that it does not have some stupid showstopper problem?
Solution
Smoke testing
Smoke testing implementation
After container has been built, if smoke test defined for DockerImageSpec (add new field):
turbobob/pkg/bobfile/bobfile.go
Lines 160 to 166 in 0e6e5bc
| type DockerImageSpec struct { | |
| Image string `json:"image"` | |
| DockerfilePath string `json:"dockerfile_path"` | |
| AuthType *string `json:"auth_type"` // creds_from_env | |
| Platforms []string `json:"platforms,omitempty"` // if set, uses buildx | |
| TagLatest bool `json:"tag_latest"` | |
| } |
Then run smoke test. Smoke test could be:
- start container, expect it to stay up for at least 5 seconds (server-type containers that don't exit in the happy path can only be asserted as "looks like it stays up")
- for expected-to-exit containers => run container, expect ~immediate successful exit
Features:
- Ability to give command line parameters
- Ability to assert stdout to contain something
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request