inspec 0.9.2 → 0.9.3
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/CHANGELOG.md +272 -49
- data/Gemfile +1 -0
- data/README.md +9 -0
- data/Rakefile +12 -0
- data/docs/resources.rst +56 -56
- data/examples/test-kitchen/test/integration/default/web_spec.rb +1 -1
- data/inspec.gemspec +8 -3
- data/lib/inspec/profile_context.rb +2 -1
- data/lib/inspec/runner.rb +8 -0
- data/lib/inspec/shell.rb +2 -2
- data/lib/inspec/version.rb +1 -1
- data/lib/resources/command.rb +2 -0
- data/lib/resources/os_env.rb +38 -6
- data/lib/resources/port.rb +16 -4
- data/lib/resources/registry_key.rb +113 -17
- data/lib/resources/script.rb +1 -3
- data/lib/resources/security_policy.rb +1 -1
- data/lib/resources/service.rb +21 -15
- data/lib/utils/simpleconfig.rb +1 -1
- data/test/helper.rb +4 -2
- data/test/integration/cookbooks/os_prepare/recipes/default.rb +2 -0
- data/test/integration/cookbooks/os_prepare/recipes/file.rb +16 -12
- data/test/integration/cookbooks/os_prepare/recipes/registry_key.rb +69 -0
- data/test/integration/cookbooks/os_prepare/recipes/service.rb +12 -0
- data/test/integration/{default → test/integration/default}/_debug_spec.rb +0 -0
- data/test/integration/{default → test/integration/default}/apt_spec.rb +0 -0
- data/test/integration/{default → test/integration/default}/file_spec.rb +0 -0
- data/test/integration/{default → test/integration/default}/group_spec.rb +0 -0
- data/test/integration/{default → test/integration/default}/kernel_module_spec.rb +0 -0
- data/test/integration/{default → test/integration/default}/kernel_parameter_spec.rb +0 -0
- data/test/integration/{default → test/integration/default}/package_spec.rb +0 -0
- data/test/integration/test/integration/default/port_spec.rb +9 -0
- data/test/integration/test/integration/default/registry_key_spec.rb +53 -0
- data/test/integration/{default → test/integration/default}/service_spec.rb +14 -1
- data/test/integration/test/integration/default/user_spec.rb +62 -0
- data/test/unit/mock/cmd/$env-PATH +1 -0
- data/test/unit/mock/cmd/env +1 -0
- data/test/unit/mock/cmd/reg_schedule +6 -1
- data/test/unit/profile_context_test.rb +14 -3
- data/test/unit/resources/os_env_test.rb +6 -1
- data/test/unit/resources/registry_key_test.rb +2 -3
- metadata +32 -22
- data/test/integration/default/user_spec.rb +0 -44
- data/test/unit/mock/cmd/PATH +0 -1
@@ -1,44 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
# root test
|
4
|
-
if ['centos', 'fedora', 'opensuse', 'debian', 'ubuntu'].include?(os[:family])
|
5
|
-
|
6
|
-
userinfo = {
|
7
|
-
name: 'root',
|
8
|
-
group: 'root',
|
9
|
-
uid: 0,
|
10
|
-
gid: 0,
|
11
|
-
groups: ["root"],
|
12
|
-
home: '/root',
|
13
|
-
shell: '/bin/bash',
|
14
|
-
}
|
15
|
-
|
16
|
-
# different groupset for centos 5
|
17
|
-
userinfo[:groups] = ["root", "bin", "daemon", "sys", "adm", "disk", "wheel"] if os[:release].to_i == 5
|
18
|
-
|
19
|
-
elsif ['freebsd'].include?(os[:family])
|
20
|
-
|
21
|
-
userinfo = {
|
22
|
-
name: 'root',
|
23
|
-
group: 'wheel',
|
24
|
-
uid: 0,
|
25
|
-
gid: 0,
|
26
|
-
groups: ["wheel", "operator"],
|
27
|
-
home: '/root',
|
28
|
-
shell: '/bin/csh',
|
29
|
-
}
|
30
|
-
|
31
|
-
else
|
32
|
-
userinfo = {}
|
33
|
-
end
|
34
|
-
|
35
|
-
describe user(userinfo[:name]) do
|
36
|
-
it { should exist }
|
37
|
-
it { should belong_to_group userinfo[:group] }
|
38
|
-
its('uid') { should eq userinfo[:uid] }
|
39
|
-
its('gid') { should eq userinfo[:gid] }
|
40
|
-
its('group') { should eq userinfo[:group] }
|
41
|
-
its('groups') { should eq userinfo[:groups] }
|
42
|
-
its('home') { should eq userinfo[:home] }
|
43
|
-
its('shell') { should eq userinfo[:shell] }
|
44
|
-
end
|
data/test/unit/mock/cmd/PATH
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|