mirror of
https://github.com/inspec/inspec
synced 2024-09-20 22:41:55 +00:00
add yml, csv, json and ini to windows integration tests
This commit is contained in:
parent
5df44fef9a
commit
b24ed632a1
5 changed files with 41 additions and 10 deletions
|
@ -9,11 +9,18 @@ gid = 'wheel' if node['platform_family'] == 'freebsd'
|
|||
|
||||
['yml', 'json', 'csv', 'ini'].each { |filetype|
|
||||
|
||||
cookbook_file "/tmp/example.#{filetype}" do
|
||||
source "example.#{filetype}"
|
||||
owner 'root'
|
||||
group gid
|
||||
mode '0755'
|
||||
action :create
|
||||
if node['platform_family'] != 'windows'
|
||||
cookbook_file "/tmp/example.#{filetype}" do
|
||||
source "example.#{filetype}"
|
||||
owner 'root'
|
||||
group gid
|
||||
mode '0755'
|
||||
action :create
|
||||
end
|
||||
else
|
||||
cookbook_file "C:/windows/temp/example.#{filetype}" do
|
||||
source "example.#{filetype}"
|
||||
action :create
|
||||
end
|
||||
end
|
||||
}
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
# encoding: utf-8
|
||||
|
||||
describe csv('/tmp/example.csv') do
|
||||
if os.unix?
|
||||
filename = '/tmp/example.csv'
|
||||
else
|
||||
filename = 'c:/windows/temp/example.csv'
|
||||
end
|
||||
|
||||
describe csv(filename) do
|
||||
its('name') { should eq(['addressable', 'ast', 'astrolabe', 'berkshelf']) }
|
||||
end
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
# encoding: utf-8
|
||||
|
||||
describe ini('/tmp/example.ini') do
|
||||
if os.unix?
|
||||
filename = '/tmp/example.ini'
|
||||
else
|
||||
filename = 'c:/windows/temp/example.ini'
|
||||
end
|
||||
|
||||
describe ini(filename) do
|
||||
its(['client','port']) { should eq('3306') }
|
||||
end
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
# encoding: utf-8
|
||||
|
||||
describe json('/tmp/example.json') do
|
||||
if os.unix?
|
||||
filename = '/tmp/example.json'
|
||||
else
|
||||
filename = 'c:/windows/temp/example.json'
|
||||
end
|
||||
|
||||
describe json(filename) do
|
||||
its(['cookbook_locks','omnibus','version']) { should eq('2.2.0') }
|
||||
end
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
# encoding: utf-8
|
||||
|
||||
describe yaml('/tmp/example.yml') do
|
||||
if os.unix?
|
||||
filename = '/tmp/example.yml'
|
||||
else
|
||||
filename = 'c:/windows/temp/example.yml'
|
||||
end
|
||||
|
||||
describe yaml(filename) do
|
||||
its(['driver','name']) { should eq('vagrant') }
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue