kitchen-inspec 0.11.1 → 0.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/.kitchen.yml +32 -0
- data/Berksfile +5 -0
- data/CHANGELOG.md +31 -3
- data/Gemfile +1 -2
- data/Rakefile +1 -1
- data/kitchen-inspec.gemspec +1 -1
- data/lib/kitchen/verifier/inspec.rb +7 -31
- data/lib/kitchen/verifier/inspec_version.rb +1 -1
- metadata +6 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 89f66fb188fababc91cda971ea797f65f3da9229
|
|
4
|
+
data.tar.gz: 99c6e5bb4d095f651ab129ab5ecf37e464c60409
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7767d067568d8a5fb1051a57b5521812ab9e56062b059ea7521711dd9c9ea973724dddc4f988d3e2e99f87e1f404807654e8eb06a806b959e018a1fac9fdbc6e
|
|
7
|
+
data.tar.gz: 41340aae6de976c57beb4cfc1ab21f9fd8a160de627bebd4c1a8504172cb8ff1f7a8b824b87e6fbbcef8295bd46bf93723e591540fe89d359189fe1a2dc73e0c
|
data/.gitignore
CHANGED
data/.kitchen.yml
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
driver:
|
|
3
|
+
name: dokken
|
|
4
|
+
|
|
5
|
+
transport:
|
|
6
|
+
name: dokken
|
|
7
|
+
|
|
8
|
+
provisioner:
|
|
9
|
+
name: dokken
|
|
10
|
+
|
|
11
|
+
verifier:
|
|
12
|
+
name: inspec
|
|
13
|
+
sudo: true
|
|
14
|
+
|
|
15
|
+
platforms:
|
|
16
|
+
- name: ubuntu
|
|
17
|
+
driver:
|
|
18
|
+
image: ubuntu:14.04
|
|
19
|
+
|
|
20
|
+
suites:
|
|
21
|
+
- name: default
|
|
22
|
+
run_list:
|
|
23
|
+
- recipe[os_prepare]
|
|
24
|
+
attributes:
|
|
25
|
+
- name: profile
|
|
26
|
+
run_list:
|
|
27
|
+
- recipe[os_prepare]
|
|
28
|
+
attributes:
|
|
29
|
+
- name: contains_inspec
|
|
30
|
+
run_list:
|
|
31
|
+
- recipe[os_prepare]
|
|
32
|
+
attributes:
|
data/Berksfile
ADDED
data/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,35 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
## [0.
|
|
4
|
-
[Full Changelog](https://github.com/chef/kitchen-inspec/compare/v0.
|
|
3
|
+
## [0.12.1](https://github.com/chef/kitchen-inspec/tree/0.12.1) (2016-02-22)
|
|
4
|
+
[Full Changelog](https://github.com/chef/kitchen-inspec/compare/v0.12.0...0.12.1)
|
|
5
|
+
|
|
6
|
+
**Merged pull requests:**
|
|
7
|
+
|
|
8
|
+
- Support inspec dir in the test suite dir [\#55](https://github.com/chef/kitchen-inspec/pull/55) ([alexpop](https://github.com/alexpop))
|
|
9
|
+
|
|
10
|
+
## [v0.12.0](https://github.com/chef/kitchen-inspec/tree/v0.12.0) (2016-02-19)
|
|
11
|
+
[Full Changelog](https://github.com/chef/kitchen-inspec/compare/v0.11.1...v0.12.0)
|
|
12
|
+
|
|
13
|
+
**Implemented enhancements:**
|
|
14
|
+
|
|
15
|
+
- move integration tests to top-level [\#50](https://github.com/chef/kitchen-inspec/pull/50) ([chris-rock](https://github.com/chris-rock))
|
|
16
|
+
- support embedded profiles, leave directory checking to inspec [\#49](https://github.com/chef/kitchen-inspec/pull/49) ([chris-rock](https://github.com/chris-rock))
|
|
17
|
+
|
|
18
|
+
**Fixed bugs:**
|
|
19
|
+
|
|
20
|
+
- Point test-kitchen to master in Gemfile [\#48](https://github.com/chef/kitchen-inspec/pull/48) ([jaym](https://github.com/jaym))
|
|
21
|
+
|
|
22
|
+
**Merged pull requests:**
|
|
23
|
+
|
|
24
|
+
- require latest inspec version [\#53](https://github.com/chef/kitchen-inspec/pull/53) ([chris-rock](https://github.com/chris-rock))
|
|
25
|
+
- 0.12.0 [\#52](https://github.com/chef/kitchen-inspec/pull/52) ([chris-rock](https://github.com/chris-rock))
|
|
26
|
+
|
|
27
|
+
## [v0.11.1](https://github.com/chef/kitchen-inspec/tree/v0.11.1) (2016-02-15)
|
|
28
|
+
[Full Changelog](https://github.com/chef/kitchen-inspec/compare/v0.11.0...v0.11.1)
|
|
29
|
+
|
|
30
|
+
**Implemented enhancements:**
|
|
31
|
+
|
|
32
|
+
- work well with other testing frameworks in test-kitchen [\#40](https://github.com/chef/kitchen-inspec/pull/40) ([chris-rock](https://github.com/chris-rock))
|
|
5
33
|
|
|
6
34
|
**Fixed bugs:**
|
|
7
35
|
|
|
@@ -9,8 +37,8 @@
|
|
|
9
37
|
|
|
10
38
|
**Merged pull requests:**
|
|
11
39
|
|
|
40
|
+
- 0.11.1 [\#47](https://github.com/chef/kitchen-inspec/pull/47) ([chris-rock](https://github.com/chris-rock))
|
|
12
41
|
- deduplicate Gemfiles [\#41](https://github.com/chef/kitchen-inspec/pull/41) ([srenatus](https://github.com/srenatus))
|
|
13
|
-
- work well with other testing frameworks in test-kitchen [\#40](https://github.com/chef/kitchen-inspec/pull/40) ([chris-rock](https://github.com/chris-rock))
|
|
14
42
|
|
|
15
43
|
## [v0.11.0](https://github.com/chef/kitchen-inspec/tree/v0.11.0) (2016-02-08)
|
|
16
44
|
[Full Changelog](https://github.com/chef/kitchen-inspec/compare/v0.10.1...v0.11.0)
|
data/Gemfile
CHANGED
|
@@ -14,8 +14,7 @@ group :test do
|
|
|
14
14
|
gem 'rubocop', '~> 0.32'
|
|
15
15
|
gem 'concurrent-ruby', '~> 0.9'
|
|
16
16
|
gem 'codeclimate-test-reporter', :require => nil
|
|
17
|
-
|
|
18
|
-
gem 'test-kitchen', git: 'https://github.com/test-kitchen/test-kitchen.git', branch: 'chris-rock/winrm-properties-fix'
|
|
17
|
+
gem 'test-kitchen', git: 'https://github.com/test-kitchen/test-kitchen.git', branch: 'master'
|
|
19
18
|
end
|
|
20
19
|
|
|
21
20
|
# pin dependency for Ruby 1.9.3 since bundler is not
|
data/Rakefile
CHANGED
|
@@ -123,6 +123,6 @@ namespace :test do
|
|
|
123
123
|
task :integration do
|
|
124
124
|
concurrency = ENV['CONCURRENCY'] || 1
|
|
125
125
|
path = File.join(File.dirname(__FILE__), 'test', 'integration')
|
|
126
|
-
sh('sh', '-c', "
|
|
126
|
+
sh('sh', '-c', "bundle exec kitchen test -c #{concurrency}")
|
|
127
127
|
end
|
|
128
128
|
end
|
data/kitchen-inspec.gemspec
CHANGED
|
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
|
20
20
|
spec.bindir = 'exe'
|
|
21
21
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
22
22
|
spec.require_paths = ['lib']
|
|
23
|
-
spec.add_dependency 'inspec', '~> 0.
|
|
23
|
+
spec.add_dependency 'inspec', '~> 0.12'
|
|
24
24
|
spec.add_development_dependency 'countloc', '~> 0.4'
|
|
25
25
|
spec.add_development_dependency 'bundler', '~> 1.10'
|
|
26
26
|
spec.add_development_dependency 'rake', '~> 10.0'
|
|
@@ -30,13 +30,13 @@ module Kitchen
|
|
|
30
30
|
# InSpec verifier for Kitchen.
|
|
31
31
|
#
|
|
32
32
|
# @author Fletcher Nichol <fnichol@chef.io>
|
|
33
|
-
class Inspec < Kitchen::Verifier::Base
|
|
33
|
+
class Inspec < Kitchen::Verifier::Base
|
|
34
34
|
kitchen_verifier_api_version 1
|
|
35
35
|
plugin_version Kitchen::Verifier::INSPEC_VERSION
|
|
36
36
|
|
|
37
37
|
# (see Base#call)
|
|
38
38
|
def call(state)
|
|
39
|
-
tests =
|
|
39
|
+
tests = local_suite_files
|
|
40
40
|
|
|
41
41
|
runner = ::Inspec::Runner.new(runner_options(instance.transport, state))
|
|
42
42
|
runner.add_tests(tests)
|
|
@@ -48,31 +48,11 @@ module Kitchen
|
|
|
48
48
|
|
|
49
49
|
private
|
|
50
50
|
|
|
51
|
-
# Determines whether or not a local workstation file exists under a
|
|
52
|
-
# Chef-related directory.
|
|
53
|
-
#
|
|
54
|
-
# @return [truthy,falsey] whether or not a given file is some kind of
|
|
55
|
-
# Chef-related file
|
|
56
|
-
# @api private
|
|
57
|
-
def chef_data_dir?(base, file)
|
|
58
|
-
file =~ %r{^#{base}/(data|data_bags|environments|nodes|roles)/}
|
|
59
|
-
end
|
|
60
|
-
|
|
61
51
|
# (see Base#load_needed_dependencies!)
|
|
62
52
|
def load_needed_dependencies!
|
|
63
53
|
require 'inspec'
|
|
64
54
|
end
|
|
65
55
|
|
|
66
|
-
# Returns an Array of common helper filenames currently residing on the
|
|
67
|
-
# local workstation.
|
|
68
|
-
#
|
|
69
|
-
# @return [Array<String>] array of helper files
|
|
70
|
-
# @api private
|
|
71
|
-
def helper_files
|
|
72
|
-
glob = File.join(config[:test_base_path], 'helpers', '*/**/*')
|
|
73
|
-
Dir.glob(glob).reject { |f| File.directory?(f) }
|
|
74
|
-
end
|
|
75
|
-
|
|
76
56
|
# Returns an Array of test suite filenames for the related suite currently
|
|
77
57
|
# residing on the local workstation. Any special provisioner-specific
|
|
78
58
|
# directories (such as a Chef roles/ directory) are excluded.
|
|
@@ -86,9 +66,9 @@ module Kitchen
|
|
|
86
66
|
def local_suite_files
|
|
87
67
|
base = File.join(config[:test_base_path], config[:suite_name])
|
|
88
68
|
legacy_mode = false
|
|
89
|
-
# check for
|
|
90
|
-
%w{serverspec bats pester rspec cucumber minitest bash}.each { |fw|
|
|
91
|
-
if Pathname.new(File.join(
|
|
69
|
+
# check for testing frameworks, we may need to add more
|
|
70
|
+
%w{inspec serverspec bats pester rspec cucumber minitest bash}.each { |fw|
|
|
71
|
+
if Pathname.new(File.join(base, fw)).exist?
|
|
92
72
|
logger.info("Detected alternative framework tests for `#{fw}`")
|
|
93
73
|
legacy_mode = true
|
|
94
74
|
end
|
|
@@ -96,13 +76,9 @@ module Kitchen
|
|
|
96
76
|
|
|
97
77
|
base = File.join(base, 'inspec') if legacy_mode
|
|
98
78
|
logger.info("Search `#{base}` for tests")
|
|
99
|
-
filter_chef_files(base, '**/*_spec.rb')
|
|
100
|
-
end
|
|
101
79
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
chef_data_dir?(base, f) || File.directory?(f)
|
|
105
|
-
end
|
|
80
|
+
# we do not filter for specific directories, this is core of inspec
|
|
81
|
+
[base]
|
|
106
82
|
end
|
|
107
83
|
|
|
108
84
|
# Returns a configuration Hash that can be passed to a `Inspec::Runner`.
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kitchen-inspec
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.12.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Fletcher Nichol
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-02-
|
|
11
|
+
date: 2016-02-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: inspec
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '0.
|
|
19
|
+
version: '0.12'
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: '0.
|
|
26
|
+
version: '0.12'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: countloc
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -116,9 +116,11 @@ extensions: []
|
|
|
116
116
|
extra_rdoc_files: []
|
|
117
117
|
files:
|
|
118
118
|
- ".gitignore"
|
|
119
|
+
- ".kitchen.yml"
|
|
119
120
|
- ".rspec"
|
|
120
121
|
- ".rubocop.yml"
|
|
121
122
|
- ".travis.yml"
|
|
123
|
+
- Berksfile
|
|
122
124
|
- CHANGELOG.md
|
|
123
125
|
- Gemfile
|
|
124
126
|
- Guardfile
|