Inspect should be able to inspect one or more containers depending on the user input. Therefore, inspect output should be in array format so the consumer could potentially iterate it. This PR allows users to specify one more or containers|images|or a mix for inspection. The output, as stated, is therefore in array form. This holds true even for a singular image. In the case that the user enters an invalid container|image "name", we handle that gracefully. Podman will output json for the valid names until it reaches the invalid one. For example: In this case, podman will out the json for alpine and then print an error about 123 being invalid. It will not continute onto busybox. This behavior imatates docker. This addresses issue #360 Signed-off-by: baude <bbaude@redhat.com> Closes: #371 Approved by: baude |
||
|---|---|---|
| .. | ||
| bin2img | ||
| build | ||
| checkseccomp | ||
| copyimg | ||
| e2e | ||
| hooks | ||
| testdata | ||
| demos.sh | ||
| policy.json | ||
| README.md | ||
| redhat_sigstore.yaml | ||
| registries.conf | ||
| test_podman_build.sh | ||
Integration testing
Our primary means of performing integration testing for libpod is with the Ginkgo BDD testing framework. This allows us to use native Golang to perform our tests and there is a strong affiliation between Ginkgo and the Go test framework.
Installing dependencies
The dependencies for integration really consists of three things:
- ginkgo binary
- ginkgo sources
- gomega sources
The following instructions assume your GOPATH is ~/go. Adjust as needed for your environment.
Installing ginkgo
Fetch and build ginkgo with the following command:
GOPATH=~/go go get -u github.com/onsi/ginkgo/ginkgo
Now install the ginkgo binary into your path:
install -D -m 755 "$GOPATH"/bin/ginkgo /usr/bin/
You now have a ginkgo binary and its sources in your GOPATH.
Install gomega sources
The gomega sources can be simply installed with the command:
GOPATH=~/go go get github.com/onsi/gomega/...
Running the integration tests
You can run the entire suite of integration tests with the following command:
GOPATH=~/go ginkgo -v tests/e2e/.
Note the trailing period on the command above. Also, -v invokes verbose mode. That switch is optional.
You can run a single file of integration tests using the go test command:
GOPATH=~/go go test -v tests/e2e/libpod_suite_test.go tests/e2e/your_test.go
Run all tests like PAPR
You can closely emulate the PAPR run for Fedora with the following command:
make integration.fedora
This will run lint, git-validation, and gofmt tests and then execute unit and integration tests as well.