summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-03-08 13:28:43 -0800
committerGitHub <noreply@github.com>2019-03-08 13:28:43 -0800
commit9b21f14eefae8ab7d24cca1087d88023245357d9 (patch)
tree867c90ace6c8b673402e7ed1bce7a65e177603fd
parentf4787aeeb4936b112d60509173372f9e05f2a7e0 (diff)
parent8a3b45728a49b46434dd8f7637e6ef2d331c712f (diff)
downloadpodman-9b21f14eefae8ab7d24cca1087d88023245357d9.tar.gz
podman-9b21f14eefae8ab7d24cca1087d88023245357d9.tar.bz2
podman-9b21f14eefae8ab7d24cca1087d88023245357d9.zip
Merge pull request #2592 from baude/testfixups
test docs fixups
-rw-r--r--test/README.md32
1 files changed, 27 insertions, 5 deletions
diff --git a/test/README.md b/test/README.md
index 5e5a7da61..4e61a0774 100644
--- a/test/README.md
+++ b/test/README.md
@@ -43,6 +43,11 @@ Build ginkgo and install it under $GOPATH/bin with the following command:
```
GOPATH=~/go make .install.ginkgo
```
+If your PATH does not include $GOPATH/bin, you might consider adding it.
+
+```
+PATH=$PATH:$GOPATH/bin
+```
# Integration Tests
Test suite for integration test for podman command line. It has its own structs:
@@ -63,21 +68,38 @@ GOPATH=~/go ginkgo -v test/e2e/.
Note the trailing period on the command above. Also, **-v** invokes verbose mode. That
switch is optional.
+
+### Running a single file of integration tests
You can run a single file of integration tests using the go test command:
```
GOPATH=~/go go test -v test/e2e/libpod_suite_test.go test/e2e/common_test.go test/e2e/config.go test/e2e/config_amd64.go test/e2e/your_test.go
```
-#### Run all tests like PAPR
-You can closely emulate the PAPR run for Fedora with the following command:
+### Running a single integration test
+Before running the test suite, you have to declare which test you want run in the test
+file itself. Consider the following actual test:
+```
+It("podman inspect bogus pod", func() {
+ session := podmanTest.Podman([]string{"pod", "inspect", "foobar"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Not(Equal(0)))
+ })
+```
+
+To mark this as the test you want run, you simply change the *It* description to *FIt*. Please note how
+both the `F` and `I` are capitalized.
+
+You can run a single integration test using the same command we used to run all the tests in a single
+file.
```
-make integration.fedora
+GOPATH=~/go go test -v test/e2e/libpod_suite_test.go test/e2e/common_test.go test/e2e/config.go test/e2e/config_amd64.go test/e2e/your_test.go
```
-This will run lint, git-validation, and gofmt tests and then execute unit and integration
-tests as well.
+*Note*: Be sure you remove the `F` from the tests before committing your changes or you will skip all tests
+in that file except the one with the `FIt` denotation.
+
### Run tests in a container
In case you have issue running the tests locally on your machine, you can run