mirror of
https://github.com/inspec/inspec
synced 2024-11-23 05:03:07 +00:00
Add clarification to INI resource re: settings in sections (#2320)
Signed-off-by: Adam Leff <adam@leff.co>
This commit is contained in:
parent
a1672dac28
commit
0e8eccfa9b
1 changed files with 14 additions and 1 deletions
|
@ -18,7 +18,7 @@ An `ini` resource block declares the configuration settings to be tested:
|
|||
|
||||
where
|
||||
|
||||
* `'setting_name'` is a synchronization setting defined in the INI file
|
||||
* `'setting_name'` is a setting key defined in the INI file
|
||||
* `('path')` is the path to the INI file
|
||||
* `{ should eq 'value' }` is the value that is expected
|
||||
|
||||
|
@ -29,6 +29,19 @@ For example:
|
|||
its('server') { should eq '192.0.2.62' }
|
||||
end
|
||||
|
||||
Settings inside of sections, such as the following:
|
||||
|
||||
[section_name]
|
||||
setting_name = 123
|
||||
|
||||
... can be retrieved by prefixing the setting_name with the section.
|
||||
|
||||
its('section_name.setting_name') { should cmp 123 }
|
||||
|
||||
In the event a section or setting name has a period in it, the alternate syntax can be used:
|
||||
|
||||
its(['section.with.a.dot.in.it', 'setting.name.with.dots']) { should cmp 'lotsadots' }
|
||||
|
||||
<br>
|
||||
|
||||
## Examples
|
||||
|
|
Loading…
Reference in a new issue