serverspec 0.11.5 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -5
- data/lib/serverspec.rb +2 -36
- data/lib/serverspec/helper.rb +2 -32
- data/lib/serverspec/helper/backend.rb +11 -0
- data/lib/serverspec/helper/os.rb +25 -0
- data/lib/serverspec/setup.rb +3 -3
- data/lib/serverspec/version.rb +1 -1
- data/serverspec.gemspec +1 -0
- data/spec/aix/command_spec.rb +1 -1
- data/spec/aix/cron_spec.rb +1 -1
- data/spec/aix/default_gateway_spec.rb +1 -1
- data/spec/aix/file_spec.rb +1 -1
- data/spec/aix/group_spec.rb +1 -1
- data/spec/aix/host_spec.rb +1 -1
- data/spec/aix/package_spec.rb +1 -1
- data/spec/aix/php_config_spec.rb +1 -1
- data/spec/aix/port_spec.rb +1 -1
- data/spec/aix/routing_table_spec.rb +1 -1
- data/spec/aix/service_spec.rb +1 -1
- data/spec/aix/user_spec.rb +1 -1
- data/spec/backend/cmd/configuration_spec.rb +2 -2
- data/spec/backend/exec/build_command_spec.rb +1 -1
- data/spec/backend/exec/configuration_spec.rb +2 -3
- data/spec/backend/powershell/script_helper_spec.rb +4 -4
- data/spec/backend/ssh/build_command_spec.rb +1 -1
- data/spec/backend/ssh/configuration_spec.rb +2 -3
- data/spec/backend/winrm/configuration_spec.rb +2 -2
- data/spec/darwin/command_spec.rb +1 -1
- data/spec/darwin/cron_spec.rb +1 -1
- data/spec/darwin/default_gateway_spec.rb +1 -1
- data/spec/darwin/file_spec.rb +1 -1
- data/spec/darwin/group_spec.rb +1 -1
- data/spec/darwin/host_spec.rb +1 -1
- data/spec/darwin/mail_alias_spec.rb +1 -1
- data/spec/darwin/package_spec.rb +1 -1
- data/spec/darwin/php_config_spec.rb +1 -1
- data/spec/darwin/port_spec.rb +1 -1
- data/spec/darwin/routing_table_spec.rb +1 -1
- data/spec/darwin/service_spec.rb +1 -1
- data/spec/darwin/user_spec.rb +1 -1
- data/spec/debian/cgroup_spec.rb +1 -1
- data/spec/debian/command_spec.rb +1 -1
- data/spec/debian/cron_spec.rb +1 -1
- data/spec/debian/default_gateway_spec.rb +1 -1
- data/spec/debian/file_spec.rb +1 -1
- data/spec/debian/group_spec.rb +1 -1
- data/spec/debian/host_spec.rb +1 -1
- data/spec/debian/interface_spec.rb +1 -1
- data/spec/debian/iptables_spec.rb +1 -1
- data/spec/debian/kernel_module_spec.rb +1 -1
- data/spec/debian/linux_kernel_parameter_spec.rb +1 -1
- data/spec/debian/lxc_spec.rb +1 -1
- data/spec/debian/mail_alias_spec.rb +1 -1
- data/spec/debian/package_spec.rb +1 -1
- data/spec/debian/php_config_spec.rb +1 -1
- data/spec/debian/port_spec.rb +1 -1
- data/spec/debian/routing_table_spec.rb +1 -1
- data/spec/debian/selinux_spec.rb +1 -1
- data/spec/debian/service_spec.rb +1 -1
- data/spec/debian/user_spec.rb +1 -1
- data/spec/debian/zfs_spec.rb +1 -1
- data/spec/freebsd/command_spec.rb +1 -1
- data/spec/freebsd/cron_spec.rb +1 -1
- data/spec/freebsd/default_gateway_spec.rb +1 -1
- data/spec/freebsd/file_spec.rb +1 -1
- data/spec/freebsd/group_spec.rb +1 -1
- data/spec/freebsd/host_spec.rb +1 -1
- data/spec/freebsd/package_spec.rb +1 -1
- data/spec/freebsd/php_config_spec.rb +1 -1
- data/spec/freebsd/port_spec.rb +1 -1
- data/spec/freebsd/routing_table_spec.rb +1 -1
- data/spec/freebsd/service_spec.rb +1 -1
- data/spec/freebsd/user_spec.rb +1 -1
- data/spec/gentoo/cgroup_spec.rb +1 -1
- data/spec/gentoo/command_spec.rb +1 -1
- data/spec/gentoo/cron_spec.rb +1 -1
- data/spec/gentoo/default_gateway_spec.rb +1 -1
- data/spec/gentoo/file_spec.rb +1 -1
- data/spec/gentoo/group_spec.rb +1 -1
- data/spec/gentoo/host_spec.rb +1 -1
- data/spec/gentoo/interface_spec.rb +1 -1
- data/spec/gentoo/iptables_spec.rb +1 -1
- data/spec/gentoo/kernel_module_spec.rb +1 -1
- data/spec/gentoo/linux_kernel_parameter_spec.rb +1 -1
- data/spec/gentoo/lxc_spec.rb +1 -1
- data/spec/gentoo/mail_alias_spec.rb +1 -1
- data/spec/gentoo/package_spec.rb +1 -1
- data/spec/gentoo/php_config_spec.rb +1 -1
- data/spec/gentoo/port_spec.rb +1 -1
- data/spec/gentoo/routing_table_spec.rb +1 -1
- data/spec/gentoo/selinux_spec.rb +1 -1
- data/spec/gentoo/service_spec.rb +1 -1
- data/spec/gentoo/user_spec.rb +1 -1
- data/spec/gentoo/zfs_spec.rb +1 -1
- data/spec/plamo/cgroup_spec.rb +1 -1
- data/spec/plamo/command_spec.rb +1 -1
- data/spec/plamo/cron_spec.rb +1 -1
- data/spec/plamo/default_gateway_spec.rb +1 -1
- data/spec/plamo/file_spec.rb +1 -1
- data/spec/plamo/group_spec.rb +1 -1
- data/spec/plamo/host_spec.rb +1 -1
- data/spec/plamo/interface_spec.rb +1 -1
- data/spec/plamo/iptables_spec.rb +1 -1
- data/spec/plamo/kernel_module_spec.rb +1 -1
- data/spec/plamo/linux_kernel_parameter_spec.rb +1 -1
- data/spec/plamo/lxc_spec.rb +1 -1
- data/spec/plamo/mail_alias_spec.rb +1 -1
- data/spec/plamo/package_spec.rb +1 -1
- data/spec/plamo/php_config_spec.rb +1 -1
- data/spec/plamo/port_spec.rb +1 -1
- data/spec/plamo/routing_table_spec.rb +1 -1
- data/spec/plamo/selinux_spec.rb +1 -1
- data/spec/plamo/service_spec.rb +1 -1
- data/spec/plamo/user_spec.rb +1 -1
- data/spec/plamo/zfs_spec.rb +1 -1
- data/spec/redhat/cgroup_spec.rb +1 -1
- data/spec/redhat/command_spec.rb +1 -1
- data/spec/redhat/cron_spec.rb +1 -1
- data/spec/redhat/default_gateway_spec.rb +1 -1
- data/spec/redhat/file_spec.rb +1 -1
- data/spec/redhat/group_spec.rb +1 -1
- data/spec/redhat/host_spec.rb +1 -1
- data/spec/redhat/interface_spec.rb +1 -1
- data/spec/redhat/iptables_spec.rb +1 -1
- data/spec/redhat/kernel_module_spec.rb +1 -1
- data/spec/redhat/linux_kernel_parameter_spec.rb +1 -1
- data/spec/redhat/lxc_spec.rb +1 -1
- data/spec/redhat/mail_alias_spec.rb +1 -1
- data/spec/redhat/package_spec.rb +1 -1
- data/spec/redhat/php_config_spec.rb +1 -1
- data/spec/redhat/port_spec.rb +1 -1
- data/spec/redhat/routing_table_spec.rb +1 -1
- data/spec/redhat/selinux_spec.rb +1 -1
- data/spec/redhat/service_spec.rb +1 -1
- data/spec/redhat/user_spec.rb +1 -1
- data/spec/redhat/yumrepo_spec.rb +1 -1
- data/spec/redhat/zfs_spec.rb +1 -1
- data/spec/smartos/mail_alias_spec.rb +1 -1
- data/spec/solaris/command_spec.rb +1 -1
- data/spec/solaris/cron_spec.rb +1 -1
- data/spec/solaris/default_gateway_spec.rb +1 -1
- data/spec/solaris/file_spec.rb +1 -1
- data/spec/solaris/group_spec.rb +1 -1
- data/spec/solaris/host_spec.rb +1 -1
- data/spec/solaris/ipfilter_spec.rb +1 -1
- data/spec/solaris/ipnat_spec.rb +1 -1
- data/spec/solaris/mail_alias_spec.rb +1 -1
- data/spec/solaris/package_spec.rb +1 -1
- data/spec/solaris/php_config_spec.rb +1 -1
- data/spec/solaris/port_spec.rb +1 -1
- data/spec/solaris/routing_table_spec.rb +1 -1
- data/spec/solaris/service_spec.rb +1 -1
- data/spec/solaris/svcprop_spec.rb +1 -1
- data/spec/solaris/user_spec.rb +1 -1
- data/spec/solaris/zfs_spec.rb +1 -1
- data/spec/solaris10/file_spec.rb +1 -1
- data/spec/solaris10/group_spec.rb +1 -1
- data/spec/solaris10/mail_alias_spec.rb +1 -1
- data/spec/solaris10/package_spec.rb +1 -1
- data/spec/solaris10/php_config_spec.rb +1 -1
- data/spec/solaris10/user_spec.rb +1 -1
- data/spec/solaris11/command_spec.rb +1 -1
- data/spec/solaris11/cron_spec.rb +1 -1
- data/spec/solaris11/default_gateway_spec.rb +1 -1
- data/spec/solaris11/file_spec.rb +1 -1
- data/spec/solaris11/group_spec.rb +1 -1
- data/spec/solaris11/host_spec.rb +1 -1
- data/spec/solaris11/ipfilter_spec.rb +1 -1
- data/spec/solaris11/ipnat_spec.rb +1 -1
- data/spec/solaris11/mail_alias_spec.rb +1 -1
- data/spec/solaris11/package_spec.rb +1 -1
- data/spec/solaris11/php_config_spec.rb +1 -1
- data/spec/solaris11/port_spec.rb +1 -1
- data/spec/solaris11/routing_table_spec.rb +1 -1
- data/spec/solaris11/service_spec.rb +1 -1
- data/spec/solaris11/svcprop_spec.rb +1 -1
- data/spec/solaris11/user_spec.rb +1 -1
- data/spec/solaris11/zfs_spec.rb +1 -1
- data/spec/spec_helper.rb +8 -6
- data/spec/windows/command_spec.rb +2 -2
- data/spec/windows/file_spec.rb +2 -2
- data/spec/windows/group_spec.rb +2 -2
- data/spec/windows/port_spec.rb +2 -2
- data/spec/windows/service_spec.rb +2 -2
- data/spec/windows/user_spec.rb +2 -2
- data/spec/windows/windows_registry_key_spec.rb +2 -2
- metadata +18 -45
- data/lib/serverspec/attributes.rb +0 -17
- data/lib/serverspec/backend.rb +0 -7
- data/lib/serverspec/backend/base.rb +0 -31
- data/lib/serverspec/backend/cmd.rb +0 -39
- data/lib/serverspec/backend/exec.rb +0 -218
- data/lib/serverspec/backend/powershell/command.rb +0 -40
- data/lib/serverspec/backend/powershell/script_helper.rb +0 -85
- data/lib/serverspec/backend/powershell/support/check_file_access_rules.ps1 +0 -8
- data/lib/serverspec/backend/powershell/support/crop_text.ps1 +0 -11
- data/lib/serverspec/backend/powershell/support/find_group.ps1 +0 -8
- data/lib/serverspec/backend/powershell/support/find_installed_application.ps1 +0 -7
- data/lib/serverspec/backend/powershell/support/find_service.ps1 +0 -5
- data/lib/serverspec/backend/powershell/support/find_user.ps1 +0 -8
- data/lib/serverspec/backend/powershell/support/find_usergroup.ps1 +0 -9
- data/lib/serverspec/backend/powershell/support/is_port_listening.ps1 +0 -13
- data/lib/serverspec/backend/ssh.rb +0 -93
- data/lib/serverspec/backend/winrm.rb +0 -26
- data/lib/serverspec/configuration.rb +0 -12
- data/lib/serverspec/helper/aix.rb +0 -9
- data/lib/serverspec/helper/attributes.rb +0 -16
- data/lib/serverspec/helper/base.rb +0 -9
- data/lib/serverspec/helper/cmd.rb +0 -15
- data/lib/serverspec/helper/configuration.rb +0 -37
- data/lib/serverspec/helper/darwin.rb +0 -9
- data/lib/serverspec/helper/debian.rb +0 -9
- data/lib/serverspec/helper/detect_os.rb +0 -19
- data/lib/serverspec/helper/exec.rb +0 -14
- data/lib/serverspec/helper/freebsd.rb +0 -9
- data/lib/serverspec/helper/gentoo.rb +0 -9
- data/lib/serverspec/helper/plamo.rb +0 -9
- data/lib/serverspec/helper/properties.rb +0 -14
- data/lib/serverspec/helper/puppet.rb +0 -9
- data/lib/serverspec/helper/redhat.rb +0 -9
- data/lib/serverspec/helper/smartos.rb +0 -10
- data/lib/serverspec/helper/solaris.rb +0 -9
- data/lib/serverspec/helper/solaris10.rb +0 -9
- data/lib/serverspec/helper/solaris11.rb +0 -9
- data/lib/serverspec/helper/ssh.rb +0 -15
- data/lib/serverspec/helper/windows.rb +0 -9
- data/lib/serverspec/helper/winrm.rb +0 -15
- data/lib/serverspec/properties.rb +0 -17
- data/spec/helpers/properties_spec.rb +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 752400de68f58e7d7e2605e2d7249e19c7e9031f
|
4
|
+
data.tar.gz: ad2e694640b507b888251fc6e34af0df35164f1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9d8eb41562f89d01e9a3d13c482b213b05dbf8f8bcfa78da00c3890cb08b1443652c151fae61e81f71cdb2487f77c2ec6b175fd02f78b145f899f582dc2a7ce
|
7
|
+
data.tar.gz: 0ee62224c780f3e79f0152bcb382d4141435cde8accbd12f3e52511d73a2d70c0bd5762caeb8cfac7eda16458a63264524e3bf4ce79fd811b9e08f7683ff0dfb
|
data/Rakefile
CHANGED
@@ -6,7 +6,7 @@ task :spec => 'spec:all'
|
|
6
6
|
namespace :spec do
|
7
7
|
oses = %w( darwin debian gentoo plamo redhat aix solaris solaris10 solaris11 smartos windows freebsd)
|
8
8
|
|
9
|
-
task :all => [ oses.map {|os| "spec:#{os}" }, :
|
9
|
+
task :all => [ oses.map {|os| "spec:#{os}" }, :exec, :ssh, :cmd, :winrm, :powershell ].flatten
|
10
10
|
|
11
11
|
oses.each do |os|
|
12
12
|
RSpec::Core::RakeTask.new(os.to_sym) do |t|
|
@@ -14,10 +14,6 @@ namespace :spec do
|
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
|
-
RSpec::Core::RakeTask.new(:helpers) do |t|
|
18
|
-
t.pattern = "spec/helpers/*_spec.rb"
|
19
|
-
end
|
20
|
-
|
21
17
|
[:exec, :ssh, :cmd, :winrm, :powershell].each do |backend|
|
22
18
|
RSpec::Core::RakeTask.new(backend) do |t|
|
23
19
|
t.pattern = "spec/backend/#{backend.to_s}/*_spec.rb"
|
data/lib/serverspec.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'rspec'
|
3
|
+
require 'specinfra'
|
3
4
|
require 'serverspec/version'
|
4
5
|
require 'serverspec/matchers'
|
5
|
-
require 'serverspec/backend'
|
6
6
|
require 'serverspec/helper'
|
7
7
|
require 'serverspec/setup'
|
8
8
|
require 'serverspec/subject'
|
@@ -20,43 +20,9 @@ require 'serverspec/commands/smartos'
|
|
20
20
|
require 'serverspec/commands/darwin'
|
21
21
|
require 'serverspec/commands/windows'
|
22
22
|
require 'serverspec/commands/freebsd'
|
23
|
-
require 'serverspec/configuration'
|
24
23
|
require 'rspec/core/formatters/base_formatter'
|
25
24
|
|
26
|
-
|
27
|
-
|
28
|
-
module Serverspec
|
29
|
-
class << self
|
30
|
-
def configuration
|
31
|
-
Serverspec::Configuration
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
RSpec.configure do |c|
|
37
|
-
c.include(Serverspec::Helper::Configuration)
|
38
|
-
c.include(Serverspec::Helper::RedHat, :os => :redhat)
|
39
|
-
c.include(Serverspec::Helper::Debian, :os => :debian)
|
40
|
-
c.include(Serverspec::Helper::Gentoo, :os => :gentoo)
|
41
|
-
c.include(Serverspec::Helper::Plamo, :os => :plamo)
|
42
|
-
c.include(Serverspec::Helper::AIX, :os => :aix)
|
43
|
-
c.include(Serverspec::Helper::Solaris, :os => :solaris)
|
44
|
-
c.include(Serverspec::Helper::Solaris10, :os => :solaris10)
|
45
|
-
c.include(Serverspec::Helper::Solaris11, :os => :solaris11)
|
46
|
-
c.include(Serverspec::Helper::SmartOS, :os => :smartos)
|
47
|
-
c.include(Serverspec::Helper::Darwin, :os => :darwin)
|
48
|
-
c.include(Serverspec::Helper::Windows, :os => :windows)
|
49
|
-
c.include(Serverspec::Helper::FreeBSD, :os => :freebsd)
|
50
|
-
c.add_setting :os, :default => nil
|
51
|
-
c.add_setting :host, :default => nil
|
52
|
-
c.add_setting :ssh, :default => nil
|
53
|
-
c.add_setting :sudo_password, :default => nil
|
54
|
-
c.add_setting :winrm, :default => nil
|
55
|
-
Serverspec.configuration.defaults.each { |k, v| c.add_setting k, :default => v }
|
56
|
-
c.before :each do
|
57
|
-
backend.set_example(example)
|
58
|
-
end
|
59
|
-
end
|
25
|
+
SPEC_TYPE = 'Serverspec'
|
60
26
|
|
61
27
|
module RSpec
|
62
28
|
module Core
|
data/lib/serverspec/helper.rb
CHANGED
@@ -1,37 +1,7 @@
|
|
1
|
-
require '
|
2
|
-
|
3
|
-
# Backend helpers
|
4
|
-
require 'serverspec/helper/ssh'
|
5
|
-
require 'serverspec/helper/exec'
|
6
|
-
require 'serverspec/helper/cmd'
|
7
|
-
require 'serverspec/helper/winrm'
|
8
|
-
require 'serverspec/helper/puppet'
|
9
|
-
|
10
|
-
# Command helpers
|
11
|
-
require 'serverspec/helper/redhat'
|
12
|
-
require 'serverspec/helper/debian'
|
13
|
-
require 'serverspec/helper/gentoo'
|
14
|
-
require 'serverspec/helper/plamo'
|
15
|
-
require 'serverspec/helper/aix'
|
16
|
-
require 'serverspec/helper/solaris'
|
17
|
-
require 'serverspec/helper/solaris10'
|
18
|
-
require 'serverspec/helper/solaris11'
|
19
|
-
require 'serverspec/helper/smartos'
|
20
|
-
require 'serverspec/helper/darwin'
|
21
|
-
require 'serverspec/helper/windows'
|
22
|
-
require 'serverspec/helper/freebsd'
|
23
|
-
require 'serverspec/helper/detect_os'
|
24
|
-
|
25
|
-
# Attributes helper
|
26
|
-
require 'serverspec/helper/attributes'
|
27
|
-
include Serverspec::Helper::Attributes
|
28
|
-
|
29
|
-
# Properties helper
|
30
|
-
require 'serverspec/helper/properties'
|
31
|
-
include Serverspec::Helper::Properties
|
1
|
+
require 'serverspec/helper/os'
|
2
|
+
require 'serverspec/helper/backend'
|
32
3
|
|
33
4
|
# Subject type helper
|
34
5
|
require 'serverspec/helper/type'
|
35
6
|
include Serverspec::Helper::Type
|
36
7
|
|
37
|
-
require 'serverspec/helper/configuration'
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module Serverspec
|
2
|
+
module Helper
|
3
|
+
[
|
4
|
+
'DetectOS',
|
5
|
+
'AIX',
|
6
|
+
'Darwin',
|
7
|
+
'Debian',
|
8
|
+
'FreeBSD',
|
9
|
+
'Gentoo',
|
10
|
+
'Plamo',
|
11
|
+
'RedHat',
|
12
|
+
'SmartOS',
|
13
|
+
'Solaris',
|
14
|
+
'Solaris10',
|
15
|
+
'Solaris11',
|
16
|
+
'Windows',
|
17
|
+
].each do |os|
|
18
|
+
eval <<-EOF
|
19
|
+
module #{os}
|
20
|
+
include self.class.const_get('SpecInfra').const_get('Helper').const_get('#{os}')
|
21
|
+
end
|
22
|
+
EOF
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/lib/serverspec/setup.rb
CHANGED
@@ -224,11 +224,11 @@ require 'net/ssh'
|
|
224
224
|
require 'winrm'
|
225
225
|
<% end -%>
|
226
226
|
|
227
|
-
include
|
227
|
+
include SpecInfra::Helper::<%= @backend_type %>
|
228
228
|
<% if @os_type == 'UN*X' -%>
|
229
|
-
include
|
229
|
+
include SpecInfra::Helper::DetectOS
|
230
230
|
<% else -%>
|
231
|
-
include
|
231
|
+
include SpecInfra::Helper::Windows
|
232
232
|
<% end -%>
|
233
233
|
|
234
234
|
<% if @os_type == 'UN*X' -%>
|
data/lib/serverspec/version.rb
CHANGED
data/serverspec.gemspec
CHANGED
@@ -21,6 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.add_runtime_dependency "net-ssh"
|
22
22
|
spec.add_runtime_dependency "rspec", ">= 2.13.0"
|
23
23
|
spec.add_runtime_dependency "highline"
|
24
|
+
spec.add_runtime_dependency "specinfra", ">= 0.0.2"
|
24
25
|
spec.add_development_dependency "bundler", "~> 1.3"
|
25
26
|
spec.add_development_dependency "rake"
|
26
27
|
end
|
data/spec/aix/command_spec.rb
CHANGED
data/spec/aix/cron_spec.rb
CHANGED
data/spec/aix/file_spec.rb
CHANGED
data/spec/aix/group_spec.rb
CHANGED
data/spec/aix/host_spec.rb
CHANGED
data/spec/aix/package_spec.rb
CHANGED
data/spec/aix/php_config_spec.rb
CHANGED
data/spec/aix/port_spec.rb
CHANGED
data/spec/aix/service_spec.rb
CHANGED
data/spec/aix/user_spec.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
require 'support/powershell_command_runner'
|
3
3
|
|
4
|
-
include
|
5
|
-
include
|
4
|
+
include SpecInfra::Helper::Cmd
|
5
|
+
include SpecInfra::Helper::Windows
|
6
6
|
|
7
7
|
describe "Cmd" do
|
8
8
|
it_behaves_like "a powershell command runner"
|
@@ -1,8 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
|
4
|
-
include
|
5
|
-
include Serverspec::Helper::Exec
|
3
|
+
include SpecInfra::Helper::RedHat
|
4
|
+
include SpecInfra::Helper::Exec
|
6
5
|
|
7
6
|
describe 'configurations are not set' do
|
8
7
|
context file('/etc/passwd') do
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
include
|
3
|
+
include SpecInfra::Backend::PowerShell::ScriptHelper
|
4
4
|
|
5
5
|
describe 'build command with path' do
|
6
6
|
before :each do
|
@@ -26,7 +26,7 @@ end
|
|
26
26
|
|
27
27
|
describe 'add pre-command' do
|
28
28
|
before :each do
|
29
|
-
|
29
|
+
SpecInfra.configuration.pre_command = 'test_pre_command'
|
30
30
|
end
|
31
31
|
|
32
32
|
it "should add the test for pre_command before the command" do
|
@@ -65,7 +65,7 @@ eof
|
|
65
65
|
end
|
66
66
|
|
67
67
|
after :each do
|
68
|
-
|
68
|
+
SpecInfra.configuration.pre_command = nil
|
69
69
|
end
|
70
70
|
end
|
71
71
|
|
@@ -101,4 +101,4 @@ eof
|
|
101
101
|
context 'simple command' do
|
102
102
|
create_script('test command').should == 'test command'
|
103
103
|
end
|
104
|
-
end
|
104
|
+
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
require 'support/powershell_command_runner'
|
3
3
|
|
4
|
-
include
|
5
|
-
include
|
4
|
+
include SpecInfra::Helper::WinRM
|
5
|
+
include SpecInfra::Helper::Windows
|
6
6
|
|
7
7
|
describe "WinRM" do
|
8
8
|
it_behaves_like "a powershell command runner"
|
data/spec/darwin/command_spec.rb
CHANGED
data/spec/darwin/cron_spec.rb
CHANGED