diff options
author | Jenkins <jenkins@review.openstack.org> | 2016-03-31 13:26:15 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2016-03-31 13:26:15 +0000 |
commit | 3073919cf35c664c06cf6e809954acd1e45354ec (patch) | |
tree | c0d1173de7c1419c70748b5373d6293bd1eb01a7 | |
parent | 680ebc0bf71f3d49af95a8eea0c87381a3090c67 (diff) | |
parent | be5801434506c4fffe22ad6b05ac6d680344c605 (diff) |
Merge "Update docs for Data-driven catalog tests"
-rw-r--r-- | doc/usage.rst | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/doc/usage.rst b/doc/usage.rst index 1294b77..6747c32 100644 --- a/doc/usage.rst +++ b/doc/usage.rst | |||
@@ -264,20 +264,36 @@ these files can be compared and everything that have been changes will become | |||
264 | visible. | 264 | visible. |
265 | 265 | ||
266 | Using the **-V** options will save the current catalog to the *catalogs* | 266 | Using the **-V** options will save the current catalog to the *catalogs* |
267 | folder. These generated catalogs can either be commited to the repository | 267 | folder. These generated catalogs can be useful when reviewing complex patches |
268 | or be used as a temporary files that you can make before doing some changes | 268 | with major changes to the modules or manifests. A diff for data changes may |
269 | to the modules or manifests and removed later. Saved catalog files can be | 269 | help a developer/reviewer examine the catalog contents and check |
270 | very useful for a developer to just review the catalog contents and check | ||
271 | that every resource or class are receiving the correct property values. | 270 | that every resource or class are receiving the correct property values. |
272 | 271 | ||
273 | You can also use **-v** option to enable automatic catalog checks. It should be | 272 | You can also use **-v** option to enable automatic catalog checks. It should be |
274 | done after you have generated the initial versions and made some changes. | 273 | done after you have generated the initial versions and made some changes. |
275 | Running the tests with this option enabled will generate the catalogs again and | 274 | Running the tests with this option enabled will generate the catalogs again and |
276 | compare them to the saved version. If there are differences the test will be | 275 | compare them to the saved version. If there are differences the test will be |
277 | failed and you will be able to locate the failed tasks. If you have catalogs | 276 | failed and you will be able to locate the failed tasks. Here is an example |
278 | commited to the repository you can use the *diff* command to review what | 277 | workflow one may use to examine a complex patch for data layer changes (we |
279 | changes to the catalog files have been introduced and commit the modified | 278 | assume she is a cool ruby developer and use the rvm manager and bundler): |
280 | catalogs if the changes are expected. | 279 | |
280 | .. code-block:: console | ||
281 | |||
282 | $ git clone https://github.com/openstack/fuel-library | ||
283 | $ cd fuel-library | ||
284 | $ rvm use ruby-2.1.3 | ||
285 | $ PUPPET_GEM_VERSION=3.4.0 | ||
286 | $ PUPPET_VERSION=3.4.0 | ||
287 | $ ./tests/noop/setup_and_diagnostics.sh -B | ||
288 | $ ./deployment/remove_modules.sh && ./deployment/update_modules.sh | ||
289 | $ ./tests/noop/noop_tests.sh -V -j10 -b -s swift | ||
290 | $ git review -d $swift_die_hard_patch_id | ||
291 | $ ./tests/noop/noop_tests.sh -v -j10 -b -s swift | ||
292 | |||
293 | At this point, the reviewer will get the data diffs proposed to the swift | ||
294 | modules and finish her thorough review. Note that the command | ||
295 | `./tests/noop/setup_and_diagnostics.sh -B` gets a clean state and sets things | ||
296 | up, while removing and updating_modules is required to make things go smooth. | ||
281 | 297 | ||
282 | Using external environment variables and custom paths | 298 | Using external environment variables and custom paths |
283 | ----------------------------------------------------- | 299 | ----------------------------------------------------- |