From 9b7574353c9021cb29d327f1f89ca0184583a966 Mon Sep 17 00:00:00 2001 From: <> Date: Thu, 14 Mar 2024 05:04:48 +0000 Subject: [PATCH] Deployed fa03475 with MkDocs version: 1.5.3 --- .nojekyll | 0 404.html | 569 ++ apply_assertions/index.html | 1126 +++ assertions/index.html | 677 ++ assets/images/favicon.png | Bin 0 -> 1870 bytes assets/javascripts/bundle.c8d2eff1.min.js | 29 + assets/javascripts/bundle.c8d2eff1.min.js.map | 7 + assets/javascripts/lunr/min/lunr.ar.min.js | 1 + assets/javascripts/lunr/min/lunr.da.min.js | 18 + assets/javascripts/lunr/min/lunr.de.min.js | 18 + assets/javascripts/lunr/min/lunr.du.min.js | 18 + assets/javascripts/lunr/min/lunr.el.min.js | 1 + assets/javascripts/lunr/min/lunr.es.min.js | 18 + assets/javascripts/lunr/min/lunr.fi.min.js | 18 + assets/javascripts/lunr/min/lunr.fr.min.js | 18 + assets/javascripts/lunr/min/lunr.he.min.js | 1 + assets/javascripts/lunr/min/lunr.hi.min.js | 1 + assets/javascripts/lunr/min/lunr.hu.min.js | 18 + assets/javascripts/lunr/min/lunr.hy.min.js | 1 + assets/javascripts/lunr/min/lunr.it.min.js | 18 + assets/javascripts/lunr/min/lunr.ja.min.js | 1 + assets/javascripts/lunr/min/lunr.jp.min.js | 1 + assets/javascripts/lunr/min/lunr.kn.min.js | 1 + assets/javascripts/lunr/min/lunr.ko.min.js | 1 + assets/javascripts/lunr/min/lunr.multi.min.js | 1 + assets/javascripts/lunr/min/lunr.nl.min.js | 18 + assets/javascripts/lunr/min/lunr.no.min.js | 18 + assets/javascripts/lunr/min/lunr.pt.min.js | 18 + assets/javascripts/lunr/min/lunr.ro.min.js | 18 + assets/javascripts/lunr/min/lunr.ru.min.js | 18 + assets/javascripts/lunr/min/lunr.sa.min.js | 1 + .../lunr/min/lunr.stemmer.support.min.js | 1 + assets/javascripts/lunr/min/lunr.sv.min.js | 18 + assets/javascripts/lunr/min/lunr.ta.min.js | 1 + assets/javascripts/lunr/min/lunr.te.min.js | 1 + assets/javascripts/lunr/min/lunr.th.min.js | 1 + assets/javascripts/lunr/min/lunr.tr.min.js | 18 + assets/javascripts/lunr/min/lunr.vi.min.js | 1 + assets/javascripts/lunr/min/lunr.zh.min.js | 1 + assets/javascripts/lunr/tinyseg.js | 206 + assets/javascripts/lunr/wordcut.js | 6708 +++++++++++++++++ .../workers/search.b8dbb3d2.min.js | 42 + .../workers/search.b8dbb3d2.min.js.map | 7 + assets/stylesheets/main.7e359304.min.css | 1 + assets/stylesheets/main.7e359304.min.css.map | 1 + assets/stylesheets/palette.06af60db.min.css | 1 + .../stylesheets/palette.06af60db.min.css.map | 1 + configuration/index.html | 836 ++ css/enhancements.css | 4 + extending_infra_tester/index.html | 1577 ++++ index.html | 770 ++ infra_tester_internals/index.html | 639 ++ plan_assertions/index.html | 774 ++ search/search_index.json | 1 + sitemap.xml | 3 + sitemap.xml.gz | Bin 0 -> 127 bytes test_output/index.html | 632 ++ writing_tests/index.html | 836 ++ 58 files changed, 15734 insertions(+) create mode 100644 .nojekyll create mode 100644 404.html create mode 100644 apply_assertions/index.html create mode 100644 assertions/index.html create mode 100644 assets/images/favicon.png create mode 100644 assets/javascripts/bundle.c8d2eff1.min.js create mode 100644 assets/javascripts/bundle.c8d2eff1.min.js.map create mode 100644 assets/javascripts/lunr/min/lunr.ar.min.js create mode 100644 assets/javascripts/lunr/min/lunr.da.min.js create mode 100644 assets/javascripts/lunr/min/lunr.de.min.js create mode 100644 assets/javascripts/lunr/min/lunr.du.min.js create mode 100644 assets/javascripts/lunr/min/lunr.el.min.js create mode 100644 assets/javascripts/lunr/min/lunr.es.min.js create mode 100644 assets/javascripts/lunr/min/lunr.fi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.fr.min.js create mode 100644 assets/javascripts/lunr/min/lunr.he.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hu.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hy.min.js create mode 100644 assets/javascripts/lunr/min/lunr.it.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ja.min.js create mode 100644 assets/javascripts/lunr/min/lunr.jp.min.js create mode 100644 assets/javascripts/lunr/min/lunr.kn.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ko.min.js create mode 100644 assets/javascripts/lunr/min/lunr.multi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.nl.min.js create mode 100644 assets/javascripts/lunr/min/lunr.no.min.js create mode 100644 assets/javascripts/lunr/min/lunr.pt.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ro.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ru.min.js create mode 100644 assets/javascripts/lunr/min/lunr.sa.min.js create mode 100644 assets/javascripts/lunr/min/lunr.stemmer.support.min.js create mode 100644 assets/javascripts/lunr/min/lunr.sv.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ta.min.js create mode 100644 assets/javascripts/lunr/min/lunr.te.min.js create mode 100644 assets/javascripts/lunr/min/lunr.th.min.js create mode 100644 assets/javascripts/lunr/min/lunr.tr.min.js create mode 100644 assets/javascripts/lunr/min/lunr.vi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.zh.min.js create mode 100644 assets/javascripts/lunr/tinyseg.js create mode 100644 assets/javascripts/lunr/wordcut.js create mode 100644 assets/javascripts/workers/search.b8dbb3d2.min.js create mode 100644 assets/javascripts/workers/search.b8dbb3d2.min.js.map create mode 100644 assets/stylesheets/main.7e359304.min.css create mode 100644 assets/stylesheets/main.7e359304.min.css.map create mode 100644 assets/stylesheets/palette.06af60db.min.css create mode 100644 assets/stylesheets/palette.06af60db.min.css.map create mode 100644 configuration/index.html create mode 100644 css/enhancements.css create mode 100644 extending_infra_tester/index.html create mode 100644 index.html create mode 100644 infra_tester_internals/index.html create mode 100644 plan_assertions/index.html create mode 100644 search/search_index.json create mode 100644 sitemap.xml create mode 100644 sitemap.xml.gz create mode 100644 test_output/index.html create mode 100644 writing_tests/index.html diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/404.html b/404.html new file mode 100644 index 0000000..57982e2 --- /dev/null +++ b/404.html @@ -0,0 +1,569 @@ + + + +
+ + + + + + + + + + + + + + +Apply assertions will be run after running terraform apply
.
Asserts that terraform apply
succeeds.
- name: <name>
+ type: ApplySucceeds
+
- name: ApplyShouldSucceed
+ type: ApplySucceeds
+
Inputs | +Description | +Type | +Required | +
---|---|---|---|
name |
+Name for the assertion | +String | +No | +
Compares a specified terraform output with an expected value.
+- name: <name>
+ type: OutputEqual
+ output_name: <output_name>
+ value: <value>
+
# `value` is of string type
+- name: ASimpleOutputEqualExample
+ type: OutputEqual
+ output_name: sample_output
+ value: a sample value
+
+# `value` is of boolean type
+- name: OutputEqualExampleForBool
+ type: OutputEqual
+ output_name: a_boolean_output
+ value: true
+
+# `value` is of float type
+- name: OutputEqualExampleForFloat
+ type: OutputEqual
+ output_name: a_float_output
+ value: 123.11
+
# `value` is of map type
+- name: OutputEqualExampleForMap
+ type: OutputEqual
+ output_name: a_map_output
+ value:
+ key: value
+
# `value` is of sequence type
+- name: OutputEqualExampleForList
+ type: OutputEqual
+ output_name: a_list_output
+ value:
+ - a
+ - b
+ - c
+
# `value` is of an object type.
+# Note this example does not have `complete_match` enabled and
+# so it only checks the terraform output for keys and their values
+# for the specified fields (In this case, it checks values of "seq",
+# "map", "nested_map", "nested_key", and "boolean" and ignores other
+# fields).
+- name: OutputEqualExampleForComplexOutput
+ type: OutputEqual
+ output_name: a_complex_output
+ value:
+ seq:
+ - a
+ - b
+ - c
+ map:
+ key: value
+ nested_map:
+ nested_key: nested_value
+ boolean: true
+
# `value` is of an object type, and a complete match is done
+- name: OutputEqualExampleForComplexOutputWithCompleteMatch
+ type: OutputEqual
+ output_name: a_complex_output
+ complete_match: true # Complete match is set to true
+ value:
+ natural_number: 100
+ float: 123.11
+ seq:
+ - a
+ - b
+ - c
+ str: hello
+ map:
+ key: value
+ nested_map:
+ nested_key: nested_value
+ boolean: true
+
Inputs | +Description | +Type | +Required | +
---|---|---|---|
name |
+Name for the assertion | +String | +No | +
output_name |
+Terraform output name to compare | +String | +Yes | +
value |
+The expected value - value can be of complex data type including objects consisting of maps, sequences, booleans, floats, integers, etc | +String, Integer, Float, Boolean, Map, Sequence, Object | +Yes | +
complete_match |
+Whether to match the full output by making sure the terraform output value has exactly the same fields specified in value - false by default |
+Boolean | +No | +
Compares multiple terraform outputs and asserts that all the specified outputs have the same value.
+- name: <name>
+ type: OutputsAreEqual
+ output_names:
+ - <output_name_1>
+ - <output_name_2>
+ ...
+
- name: TwoOutputsMustMatch
+ type: OutputsAreEqual
+ output_names:
+ - sample_output
+ - another_output
+
- name: MultipleOutputsMustMatch
+ type: OutputsAreEqual
+ output_names:
+ - sample_output
+ - another_output
+ - yet_another_output
+
Inputs | +Description | +Type | +Required | +
---|---|---|---|
name |
+Name for the assertion | +String | +No | +
output_names |
+List of terraform output names | +Sequence of String | +Yes | +
Asserts that the specified terraform output contains a specified string.
+- name: <name>
+ type: OutputContains
+ output_name: <output_name>
+ value: <value>
+
- name: OutputContainsACertainSubString
+ type: OutputContains
+ output_name: sample_output
+ value: a certain substring
+
Inputs | +Description | +Type | +Required | +
---|---|---|---|
name |
+Name for the assertion | +String | +No | +
output_name |
+Name of the terraform output | +String | +Yes | +
value |
+A substring that the terraform output must contain | +String | +Yes | +
Asserts that the specified terraform output matches a specified regular expression.
+- name: <name>
+ type: OutputMatchesRegex
+ output_name: <output_name>
+ regex: <value>
+
- name: OutputShouldMatchARegularExpression
+ type: OutputMatchesRegex
+ output_name: a_fourth_output
+ regex: strings \w+ \d+ apple \d\s+\w+
+
Inputs | +Description | +Type | +Required | +
---|---|---|---|
name |
+Name for the assertion | +String | +No | +
output_name |
+Name of the terraform output | +String | +Yes | +
regex |
+Regular expression that the terraform output should match against | +String | +Yes | +
Asserts that terraform apply
added, and/or changed, and/or destroyed a specified number of resources.
- name: <name>
+ type: ResourcesAffected
+ added: <added>
+ changed: <changed>
+ destroyed: <destroyed>
+
# This only asserts that 1 resource has been added.
+- name: MustAddExactlyOneResource
+ type: ResourcesAffected
+ added: 1
+
+# This only asserts that 5 resources have been changed.
+- name: MustChangeFiveResource
+ type: ResourcesAffected
+ changed: 5
+
+# This only asserts that 1 resource has been destroyed.
+- name: MustDestroyOneResource
+ type: ResourcesAffected
+ destroyed: 1
+
# This only asserts that 1 resource has been added, and 5 were changed.
+- name: MustAffectSpecificNumberOfResources
+ type: ResourcesAffected
+ added: 1
+ changed: 5
+
+# This only asserts that 1 resource has been added, 5 were changed, and 0 were destroyed.
+- name: MustAffectSpecificNumberOfResources
+ type: ResourcesAffected
+ added: 1
+ changed: 5
+ destroyed: 0
+
Inputs | +Description | +Type | +Required | +
---|---|---|---|
name |
+Name for the assertion | +String | +No | +
added |
+Number of resources that must have been added | +Integer | +No | +
changed |
+Number of resources that must have been changed | +Integer | +No | +
destroyed |
+Number of resources that must have been destroyed | +Integer | +No | +
Warning
+At least one of added
, changed
, or destroyed
must be specified.
+If a field is not specified, infra-tester will not check against that
+specific field. Note that the default for unspecified fields is not zero.
Similar to ResourcesAffected, but asserts that no resources have been added, changed, or destroyed.
+- name: <name>
+ type: NoResourcesAffected
+
- name: MustAffectNoResource
+ type: NoResourcesAffected
+
Assertions are the core of infra-tester. infra-tester provides several assertions to define your tests. "Plan assertions" run after the terraform plan
step and "Apply Assertions" run after the terraform apply
step.
Assertions generally have the following schema:
+- name: <An optional name for the assertion>
+ type: <Type of the assertion>
+ <Inputs specific to the assertion>
+
name
¶This an optional field which allows you to set a custom meaningful name for the assertion.
+If a value is set for name
, it will be used in generating the test summary.
type
¶The value of type
must be one of the valid assertion types available.
+You can refer to plan and apply assertions for the list of valid assertions.
Some assertions may require inputs, and different assertions will have different inputs.
+ + + + + + + + + + + + + +{"use strict";/*!
+ * escape-html
+ * Copyright(c) 2012-2013 TJ Holowaychuk
+ * Copyright(c) 2015 Andreas Lubbe
+ * Copyright(c) 2015 Tiancheng "Timothy" Gu
+ * MIT Licensed
+ */var Va=/["'&<>]/;qn.exports=za;function za(e){var t=""+e,r=Va.exec(t);if(!r)return t;var o,n="",i=0,s=0;for(i=r.index;i