Browse code

test.md improvements and corrections:

- Mentioned integration-cli test-suite deprecation.
- Removed mentions of removed in-container hack/make.sh
target test-unit, replaced with hack/test/unit.

Signed-off-by: Brett Randall <javabrett@gmail.com>

Brett Randall authored on 2017/12/29 12:28:46
Showing 1 changed files
... ...
@@ -29,7 +29,10 @@ Depending on your contribution, you may need to add _integration tests_. These
29 29
 are tests that combine two or more work units into one component. These work
30 30
 units each have unit tests and then, together, integration tests that test the
31 31
 interface between the components. The `integration` and `integration-cli`
32
-directories in the Docker repository contain integration test code.
32
+directories in the Docker repository contain integration test code.  Note that
33
+`integration-cli` tests are now deprecated in the Moby project, and new tests
34
+cannot be added to this suite - add `integration` tests instead using the API
35
+client.
33 36
 
34 37
 Testing is its own specialty. If you aren't familiar with testing techniques,
35 38
 there is a lot of information available to you on the Web. For now, you should
... ...
@@ -93,7 +96,8 @@ hour. To run the test suite, do the following:
93 93
 ## Run targets inside a development container
94 94
 
95 95
 If you are working inside a development container, you use the
96
-`hack/make.sh` script to run tests. The `hack/make.sh` script doesn't
96
+`hack/test/unit` script to run unit-tests, and `hack/make.sh` script to run
97
+integration and other tests. The `hack/make.sh` script doesn't
97 98
 have a single target that runs all the tests. Instead, you provide a single
98 99
 command line with multiple targets that does the same thing.
99 100
 
... ...
@@ -110,19 +114,25 @@ Try this now.
110 110
     $ docker run --privileged --rm -ti -v `pwd`:/go/src/github.com/docker/docker dry-run-test /bin/bash
111 111
     ```
112 112
 
113
-3.  Run the tests using the `hack/make.sh` script.
113
+3.  Run the unit tests using the `hack/test/unit` script.
114 114
 
115 115
     ```bash
116
-    root@5f8630b873fe:/go/src/github.com/docker/docker# hack/make.sh dynbinary binary cross test-unit test-integration test-docker-py
116
+    root@5f8630b873fe:/go/src/github.com/docker/docker# hack/test/unit
117
+    ```
118
+
119
+4.  Run the tests using the `hack/make.sh` script.
120
+
121
+    ```bash
122
+    root@5f8630b873fe:/go/src/github.com/docker/docker# hack/make.sh dynbinary binary cross test-integration test-docker-py
117 123
     ```
118 124
 
119 125
     The tests run just as they did within your local host.
120 126
 
121 127
     Of course, you can also run a subset of these targets too. For example, to run
122
-    just the unit tests:
128
+    just the integration tests:
123 129
 
124 130
     ```bash
125
-    root@5f8630b873fe:/go/src/github.com/docker/docker# hack/make.sh dynbinary binary cross test-unit
131
+    root@5f8630b873fe:/go/src/github.com/docker/docker# hack/make.sh dynbinary binary cross test-integration
126 132
     ```
127 133
 
128 134
     Most test targets require that you build these precursor targets first: