mirror of
https://github.com/saltstack-formulas/template-formula.git
synced 2025-04-17 10:10:28 +00:00
style(inspec): match current practices for file and control names
I don't find a reference best practices in the documentation but as stated during a SaltStack Formula Workgroup meeting: - the `_spec` in the control file name is inherited from RSpec and few examples use it - the `control` name should be an identifier, I matched the `tpldot` name - the `title` is a human readable description of the `control` - remove `impact` which is not appropriate for an integration test
This commit is contained in:
parent
978a7e7cd0
commit
aa8a58b715
6 changed files with 11 additions and 12 deletions
|
@ -18,7 +18,7 @@
|
|||
/*/_mapdata/ @saltstack-formulas/ssf
|
||||
/*/libsaltcli.jinja @saltstack-formulas/ssf
|
||||
/*/libtofs.jinja @saltstack-formulas/ssf
|
||||
/test/integration/**/_mapdata_spec.rb @saltstack-formulas/ssf
|
||||
/test/integration/**/_mapdata.rb @saltstack-formulas/ssf
|
||||
/test/integration/**/libraries/system.rb @saltstack-formulas/ssf
|
||||
/test/integration/**/inspec.yml @saltstack-formulas/ssf
|
||||
/test/integration/**/README.md @saltstack-formulas/ssf
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
require 'yaml'
|
||||
|
||||
control '`map.jinja` YAML dump' do
|
||||
title 'should match the comparison file'
|
||||
control 'TEMPLATE._mapdata' do
|
||||
title '`map.jinja` should match the reference file'
|
||||
|
||||
### Method
|
||||
# The steps below for each file appear convoluted but they are both required
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
control 'TEMPLATE configuration' do
|
||||
title 'should match desired lines'
|
||||
control 'TEMPLATE.config.file' do
|
||||
title 'Verify the configuration file'
|
||||
|
||||
describe file('/etc/template-formula.conf') do
|
||||
it { should be_file }
|
|
@ -3,8 +3,8 @@
|
|||
# Prepare platform "finger"
|
||||
platform_finger = system.platform[:finger].split('.').first.to_s
|
||||
|
||||
control 'TEMPLATE package' do
|
||||
title 'should be installed'
|
||||
control 'TEMPLATE.package.install' do
|
||||
title 'The required package should be installed'
|
||||
|
||||
# Overide by `platform_finger`
|
||||
package_name =
|
|
@ -3,9 +3,8 @@
|
|||
# Prepare platform "finger"
|
||||
platform_finger = system.platform[:finger].split('.').first.to_s
|
||||
|
||||
control 'TEMPLATE service' do
|
||||
impact 0.5
|
||||
title 'should be running and enabled'
|
||||
control 'TEMPLATE.service.running' do
|
||||
title 'The service should be installed, enabled and running'
|
||||
|
||||
# Overide by `platform_finger`
|
||||
service_name =
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
control 'TEMPLATE subcomponent configuration' do
|
||||
title 'should match desired lines'
|
||||
control 'TEMPLATE.subcomponent.config.file' do
|
||||
title 'Verify the subcomponent configuration file'
|
||||
|
||||
describe file('/etc/TEMPLATE-subcomponent-formula.conf') do
|
||||
it { should be_file }
|
Loading…
Add table
Reference in a new issue