README.md in onceover-3.21.0 vs README.md in onceover-3.22.0
- old
+ new
@@ -223,11 +223,11 @@
non_windows:
include: 'all_nodes' # Start with all nodes
exclude: 'windows_nodes' # Then remove the windows ones from that list
```
-It's important to note that in order to reference a group using the *include/exclude* syntax is has to have been defined already i.e. it has to come above the group that references it
+It's important to note that in order to reference a group using the *include/exclude* syntax it has to have been defined already i.e. it has to come above the group that references it
#### Examples
##### Minimal
@@ -381,9 +381,53 @@
```
In this case, you're all set and onceover will auto-magically pick those up for you.
**Note**: The top level `trusted` hash takes precidence over the `trusted[extensions]` hash nested under `values`. Meaning that if you have any specified at the top level, any nested ones will not be considered. So pick **ONE** method and stick with that.
+
+#### Trusted Certname
+**Note:** When testing with Puppet >= 4.3 the trusted facts hash will have the standard trusted fact keys (certname, domain, and hostname) populated based on the node name (as set with :node).
+
+To support the resolution of the trusted fact `certname` in auto-generated spec tests, onceover will set `:node` to the value of `trusted[certname]` where present in the source factset.
+
+For example: A spec test generated by the factset below would result in `:node` == `node.puppetlabs.net`.
+
+```json
+{
+ "name": "node.puppetlabs.net",
+ "values": {
+ "aio_agent_build": "1.10.4",
+ "aio_agent_version": "1.10.4",
+ "architecture": "x86_64",
+ "trusted": {
+ "certname": "node.puppetlabs.net",
+ "extensions": {
+ "pp_role": "agent",
+ "pp_datacenter": "puppet"
+ }
+ }
+```
+
+If `trusted[certname]` is absent, the value of `:node` will default to the FQDN of the host running onceover. For example:
+
+```json
+{
+ "name": "node.puppetlabs.net",
+ "values": {
+ "aio_agent_build": "1.10.4",
+ "aio_agent_version": "1.10.4",
+ "architecture": "x86_64",
+ "trusted": {
+ "extensions": {
+ "pp_role": "agent",
+ "pp_datacenter": "puppet"
+ }
+ }
+```
+
+See the following rspec-puppet links for more information:
+ - [Specifying the FQDN of the test node](https://github.com/puppetlabs/rspec-puppet#specifying-the-fqdn-of-the-test-node)
+ - [Specifying trusted facts](https://github.com/puppetlabs/rspec-puppet#specifying-trusted-facts)
#### Trusted External Data
**Note:** This feature requires `rspec-puppet` >= 2.8.0.