This is an automated email from the ASF dual-hosted git repository. duncangrant pushed a commit to branch ruby-3 in repository https://gitbox.apache.org/repos/asf/brooklyn-docs.git
commit f970695559d6c00809ce53163b5ad2f4c25e9bc5 Merge: b40c7ed 3772c21 Author: Alex Heneveld <[email protected]> AuthorDate: Tue Sep 4 14:16:55 2018 +0100 Merge commit '3772c215' into release-5.0-reverted-222 .../appserver-clustered-w-db-concise.yaml | 2 +- .../example_yaml/appserver-clustered-w-db.yaml | 2 +- .../example_yaml/appserver-configured.yaml | 2 +- .../example_yaml/appserver-w-db-other-flavor.yaml | 2 +- guide/blueprints/example_yaml/appserver-w-db.yaml | 2 +- .../blueprints/example_yaml/appserver-w-policy.yaml | 2 +- .../blueprints/example_yaml/brooklyn-elk-catalog.bom | 2 +- .../example_yaml/entities/testeffector-entity.yaml | 2 +- .../testcases/effector-test-snippet.yaml | 2 +- .../testcases/getting-started-test-example.yaml | 4 ++-- guide/blueprints/test/usage-examples.md | 20 ++++++++++---------- guide/ops/gui/_my-web-cluster.yaml | 2 +- guide/ops/gui/_my-web-cluster2.yaml | 2 +- guide/start/_my-web-cluster.yaml | 4 ++-- guide/start/_my-web-cluster2.yaml | 2 +- guide/start/example_yaml/mycluster.yaml | 2 +- 16 files changed, 27 insertions(+), 27 deletions(-) diff --cc guide/blueprints/test/usage-examples.md index 08d88e3,91951a0..54b1826 --- a/guide/blueprints/test/usage-examples.md +++ b/guide/blueprints/test/usage-examples.md @@@ -23,20 -17,8 +23,10 @@@ Demonstrates the following sensor asser - asserts that the `webappcluster` entity `service.isUp` sensor is `true` within 10 minutes of blueprint being deployed. -!CODEFILE "example_yaml/testcases/sensor-test-snippet.yaml" +{% highlight yaml %} +{% read example_yaml/testcases/sensor-test-snippet.yaml %} +{% endhighlight %} - ### HTTP Call Tests - Demonstrates the following HTTP Call assertions against the specified `url`, which in these examples are being built from the `webappcluster` entities `host.address` and `proxy.http.port` sensors (the tester having flexibility in how the test URL is to be constructed): - - - asserts the response status code is 200 within 10 minutes of the blueprint being deployed. - - asserts the response body matches the regex `(?s).*Br[o]{2}klyn Deployed.*` within 10 minutes of the blueprint being deployed. Note the presence of the `(?s)` dotall flag to test a multiline response. - - {% highlight yaml %} - {% readj example_yaml/testcases/http-test-snippet.yaml %} - {% endhighlight %} - ### Effector Test (via TestCase entity) This `TestEffector` example demonstrates the use of the `TestCase` and `TestSensor` entities to ensure the service has started before invoking an effector using the `TestEffector` entity. @@@ -46,10 -28,16 +36,20 @@@ - `deploy` effector invoked to deploy war to a `newcontext` with a 5 minute timeout to allow completion of the deploy task. - asserts `/newcontext` url returns a HTTP status code 200 within 5 minutes of the effector being invoked (Note that this timeout is relative to the preceding test entity as they are being sequentially run as children of a `TestCase` entity). -!CODEFILE "example_yaml/testcases/effector-test-snippet.yaml" +{% highlight yaml %} +{% readj example_yaml/testcases/effector-test-snippet.yaml %} +{% endhighlight %} + ### HTTP Call Tests + Demonstrates the following HTTP Call assertions against the specified `url`, which in these examples are being built from the `webappcluster` entities `host.address` and `proxy.http.port` sensors (the tester having flexibility in how the test URL is to be constructed): + + - asserts the response status code is 200 within 10 minutes of the blueprint being deployed. + - asserts the response body matches the regex `(?s).*Br[o]{2}klyn Deployed.*` within 10 minutes of the blueprint being deployed. Note the presence of the `(?s)` dotall flag to test a multiline response. + -!CODEFILE "example_yaml/testcases/http-test-snippet.yaml" ++{% highlight yaml %} ++{% readj example_yaml/testcases/http-test-snippet.yaml %} ++{% endhighlight %} + ### Full Example A sample blueprint containing all the tests described above is available [here](./example_yaml/testcases/getting-started-test-example.yaml).
