-
-
- require 'yaml'
-
- control 'openssh._mapdata' do
- title '`map.jinja` should match the reference file'
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- platform_finger = system.platform[:finger].split('.').first.to_s
-
- mapdata_file_path = "_mapdata/#{platform_finger}.yaml"
-
-
- mapdata_file_yaml = YAML.load(inspec.profile.file(mapdata_file_path))
-
- mapdata_file_dump = YAML.dump(mapdata_file_yaml)
-
-
-
-
- output_dir = platform[:family] == 'windows' ? '/temp' : '/tmp'
-
- output_file_path = "#{output_dir}/salt_mapdata_dump.yaml"
-
-
- output_file_yaml = yaml(output_file_path).params
-
- output_file_dump = YAML.dump(output_file_yaml)
-
- describe 'File content' do
- it 'should match profile map data exactly' do
- expect(output_file_dump).to eq(mapdata_file_dump)
- end
- end
- end
|