serverspec 2.0.0.beta13 → 2.0.0.beta14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/serverspec.rb +1 -1
- data/lib/serverspec/type/default_gateway.rb +2 -2
- data/lib/serverspec/type/file.rb +1 -1
- data/lib/serverspec/type/interface.rb +1 -1
- data/lib/serverspec/type/package.rb +1 -1
- data/lib/serverspec/type/process.rb +1 -1
- data/lib/serverspec/version.rb +1 -1
- data/serverspec.gemspec +1 -1
- data/spec/type/aix/file_spec.rb +0 -4
- data/spec/type/aix/group_spec.rb +0 -4
- data/spec/type/aix/package_spec.rb +0 -4
- data/spec/type/aix/port_spec.rb +0 -4
- data/spec/type/aix/service_spec.rb +0 -4
- data/spec/type/aix/user_spec.rb +0 -4
- data/spec/type/arch/file_spec.rb +0 -4
- data/spec/type/arch/package_spec.rb +2 -4
- data/spec/type/arch/service_spec.rb +0 -4
- data/spec/type/base/cron_spec.rb +0 -4
- data/spec/type/base/default_gateway_spec.rb +0 -3
- data/spec/type/base/file_spec.rb +0 -4
- data/spec/type/base/group_spec.rb +0 -4
- data/spec/type/base/host_spec.rb +0 -4
- data/spec/type/base/mail_alias_spec.rb +0 -4
- data/spec/type/base/package_spec.rb +0 -4
- data/spec/type/base/port_spec.rb +0 -4
- data/spec/type/base/process_spec.rb +0 -4
- data/spec/type/base/routing_table_spec.rb +0 -4
- data/spec/type/base/service_spec.rb +0 -4
- data/spec/type/base/user_spec.rb +0 -4
- data/spec/type/darwin/file_spec.rb +0 -4
- data/spec/type/darwin/package_spec.rb +0 -4
- data/spec/type/darwin/port_spec.rb +0 -4
- data/spec/type/darwin/service_spec.rb +0 -4
- data/spec/type/debian/package_spec.rb +0 -4
- data/spec/type/debian/service_spec.rb +0 -4
- data/spec/type/fedora/service_spec.rb +0 -4
- data/spec/type/fedora15/service_spec.rb +0 -4
- data/spec/type/fedora20/service_spec.rb +0 -4
- data/spec/type/freebsd/file_spec.rb +0 -4
- data/spec/type/freebsd/package_spec.rb +0 -4
- data/spec/type/freebsd/port_spec.rb +0 -4
- data/spec/type/freebsd/service_spec.rb +0 -4
- data/spec/type/freebsd10/package_spec.rb +0 -4
- data/spec/type/gentoo/package_spec.rb +0 -4
- data/spec/type/gentoo/service_spec.rb +0 -4
- data/spec/type/linux/file_spec.rb +0 -4
- data/spec/type/linux/interface_spec.rb +0 -4
- data/spec/type/linux/iptables_spec.rb +0 -4
- data/spec/type/linux/kernel_module_spec.rb +0 -4
- data/spec/type/linux/lxc_container_spec.rb +0 -4
- data/spec/type/linux/selinux_spec.rb +0 -4
- data/spec/type/linux/zfs_spec.rb +0 -4
- data/spec/type/nixos/package_spec.rb +0 -4
- data/spec/type/nixos/service_spec.rb +0 -4
- data/spec/type/openbsd/file_spec.rb +0 -4
- data/spec/type/openbsd/interface_spec.rb +0 -4
- data/spec/type/openbsd/mail_alias_spec.rb +0 -4
- data/spec/type/openbsd/package_spec.rb +0 -4
- data/spec/type/openbsd/port_spec.rb +0 -4
- data/spec/type/openbsd/service_spec.rb +0 -4
- data/spec/type/openbsd/user_spec.rb +0 -4
- data/spec/type/opensuse/service_spec.rb +0 -4
- data/spec/type/plamo/package_spec.rb +0 -4
- data/spec/type/plamo/service_spec.rb +0 -4
- data/spec/type/redhat/file_spec.rb +0 -4
- data/spec/type/redhat/package_spec.rb +0 -4
- data/spec/type/redhat/service_spec.rb +0 -4
- data/spec/type/redhat/yumrepo_spec.rb +0 -4
- data/spec/type/redhat5/iptables_spec.rb +0 -4
- data/spec/type/redhat7/service_spec.rb +0 -4
- data/spec/type/smartos/package_spec.rb +0 -4
- data/spec/type/smartos/service_spec.rb +0 -4
- data/spec/type/solaris/cron_spec.rb +0 -4
- data/spec/type/solaris/file_spec.rb +0 -4
- data/spec/type/solaris/group_spec.rb +0 -4
- data/spec/type/solaris/host_spec.rb +0 -4
- data/spec/type/solaris/ipfilter_spec.rb +0 -4
- data/spec/type/solaris/ipnat_spec.rb +0 -4
- data/spec/type/solaris/package_spec.rb +0 -4
- data/spec/type/solaris/port_spec.rb +0 -4
- data/spec/type/solaris/service_spec.rb +0 -4
- data/spec/type/solaris/user_spec.rb +0 -4
- data/spec/type/solaris/zfs_spec.rb +0 -4
- data/spec/type/solaris10/file_spec.rb +0 -4
- data/spec/type/solaris10/group_spec.rb +0 -4
- data/spec/type/solaris10/host_spec.rb +0 -4
- data/spec/type/solaris10/package_spec.rb +0 -4
- data/spec/type/solaris10/user_spec.rb +0 -4
- data/spec/type/suse/package_spec.rb +0 -4
- data/spec/type/suse/service_spec.rb +0 -4
- data/spec/type/ubuntu/ppa_spec.rb +0 -4
- data/spec/type/ubuntu/service_spec.rb +0 -4
- data/spec/type/windows/feature_spec.rb +0 -4
- data/spec/type/windows/file_spec.rb +0 -4
- data/spec/type/windows/group_spec.rb +0 -4
- data/spec/type/windows/host_spec.rb +0 -4
- data/spec/type/windows/hot_fix_spec.rb +0 -4
- data/spec/type/windows/iis_app_pool_spec.rb +0 -4
- data/spec/type/windows/iis_webisite_spec.rb +0 -4
- data/spec/type/windows/package_spec.rb +0 -4
- data/spec/type/windows/port_spec.rb +0 -4
- data/spec/type/windows/registry_key_spec.rb +0 -4
- data/spec/type/windows/scheduled_task_spec.rb +0 -4
- data/spec/type/windows/service_spec.rb +0 -4
- data/spec/type/windows/user_spec.rb +0 -4
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10e0a503abed00be31b8a9824c6fabd65493265f
|
4
|
+
data.tar.gz: 4633170014576075194dc5190171cbc9f8101008
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b59be2057429d85e4231467ef79ed844364453eca3c041400d56b1709be454c8c1996e642e25b5133ff5cfc290c2da4666f8e41fdca46aa4081cdeb40575fede
|
7
|
+
data.tar.gz: c480f1dc7ac100e1c7ae24b1a82b04e17d0131fe32ceef6b372c56264c1b51033edcfaa8cae0d1a3cbd8c81b3534282dfc3a981d7d0ab5beb3bd62d5cfe55d06
|
data/lib/serverspec.rb
CHANGED
@@ -2,13 +2,13 @@ module Serverspec
|
|
2
2
|
module Type
|
3
3
|
class DefaultGateway < Base
|
4
4
|
def ipaddress
|
5
|
-
ret = @runner.
|
5
|
+
ret = @runner.get_routing_table_entry(:destination => 'default')
|
6
6
|
ret.stdout =~ /^(\S+)(?: via (\S+))? dev (\S+).+(?:\r)?\n(?:default via (\S+))?/
|
7
7
|
$2 ? $2 : $4
|
8
8
|
end
|
9
9
|
|
10
10
|
def interface
|
11
|
-
ret = @runner.
|
11
|
+
ret = @runner.get_routing_table_entry(:destination => 'default')
|
12
12
|
ret.stdout =~ /^(\S+)(?: via (\S+))? dev (\S+).+(?:\r)?\n(?:default via (\S+))?/
|
13
13
|
$3
|
14
14
|
end
|
data/lib/serverspec/type/file.rb
CHANGED
data/lib/serverspec/version.rb
CHANGED
data/serverspec.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.add_runtime_dependency "rspec", "~> 3.0.0"
|
22
22
|
spec.add_runtime_dependency "rspec-its"
|
23
|
-
spec.add_runtime_dependency "specinfra", "~> 2.0.0.
|
23
|
+
spec.add_runtime_dependency "specinfra", "~> 2.0.0.beta13"
|
24
24
|
spec.add_development_dependency "bundler", "~> 1.3"
|
25
25
|
spec.add_development_dependency "rake", "~> 10.1.1"
|
26
26
|
end
|
data/spec/type/aix/file_spec.rb
CHANGED
@@ -2,10 +2,6 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
set :os, {:family => 'aix'}
|
4
4
|
|
5
|
-
describe commands.command_class('file').create do
|
6
|
-
it { should be_an_instance_of(Specinfra::Command::Aix::Base::File) }
|
7
|
-
end
|
8
|
-
|
9
5
|
describe file('/tmp') do
|
10
6
|
it { should be_readable.by_user('mail') }
|
11
7
|
end
|
data/spec/type/aix/group_spec.rb
CHANGED
data/spec/type/aix/port_spec.rb
CHANGED
@@ -2,10 +2,6 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
set :os, :family => 'aix'
|
4
4
|
|
5
|
-
describe commands.command_class('port').create do
|
6
|
-
it { should be_an_instance_of(Specinfra::Command::Aix::Base::Port) }
|
7
|
-
end
|
8
|
-
|
9
5
|
describe Serverspec::Type::Port do
|
10
6
|
describe port(80) do
|
11
7
|
it { should be_listening }
|
data/spec/type/aix/user_spec.rb
CHANGED
data/spec/type/arch/file_spec.rb
CHANGED
@@ -2,10 +2,6 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
set :os, :family => 'arch'
|
4
4
|
|
5
|
-
describe commands.command_class('file').create do
|
6
|
-
it { should be_an_instance_of(Specinfra::Command::Arch::Base::File) }
|
7
|
-
end
|
8
|
-
|
9
5
|
describe file('/tmp') do
|
10
6
|
it { should be_readable.by_user('mail') }
|
11
7
|
end
|
@@ -2,10 +2,7 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
set :os, :family => 'arch'
|
4
4
|
|
5
|
-
|
6
|
-
it { should be_an_instance_of(Specinfra::Command::Arch::Base::Package) }
|
7
|
-
end
|
8
|
-
|
5
|
+
=begin
|
9
6
|
describe package('httpd') do
|
10
7
|
it { should be_installed }
|
11
8
|
end
|
@@ -21,6 +18,7 @@ end
|
|
21
18
|
describe package('httpd') do
|
22
19
|
it { should_not be_installed.with_version('invalid-version') }
|
23
20
|
end
|
21
|
+
=end
|
24
22
|
|
25
23
|
describe package('httpd') do
|
26
24
|
let(:stdout) { "2.2.15\n" }
|
@@ -2,10 +2,6 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
set :os, :family => 'arch'
|
4
4
|
|
5
|
-
describe commands.command_class('service').create do
|
6
|
-
it { should be_an_instance_of(Specinfra::Command::Arch::Base::Service) }
|
7
|
-
end
|
8
|
-
|
9
5
|
describe service('sshd') do
|
10
6
|
it { should be_enabled }
|
11
7
|
it { should be_running }
|
data/spec/type/base/cron_spec.rb
CHANGED
@@ -2,10 +2,6 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
set :os, :family => 'base'
|
4
4
|
|
5
|
-
describe commands.command_class('cron').create do
|
6
|
-
it { should be_an_instance_of(Specinfra::Command::Base::Cron) }
|
7
|
-
end
|
8
|
-
|
9
5
|
describe cron do
|
10
6
|
it { should have_entry '* * * * * /usr/local/bin/batch.sh' }
|
11
7
|
end
|
@@ -4,11 +4,8 @@ set :os, :family => 'base'
|
|
4
4
|
|
5
5
|
describe default_gateway do
|
6
6
|
let(:stdout) { "default via 192.168.1.1 dev eth1 \r\n" }
|
7
|
-
|
8
7
|
its(:ipaddress) { should eq '192.168.1.1' }
|
9
|
-
|
10
8
|
its(:interface) { should eq 'eth1' }
|
11
|
-
|
12
9
|
its(:ipaddress) { should_not eq '192.168.1.2' }
|
13
10
|
its(:interface) { should_not eq 'eth0' }
|
14
11
|
end
|
data/spec/type/base/file_spec.rb
CHANGED
data/spec/type/base/host_spec.rb
CHANGED
@@ -2,10 +2,6 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
set :os, :family => 'base'
|
4
4
|
|
5
|
-
describe commands.command_class('mail_alias').create do
|
6
|
-
it { should be_an_instance_of(Specinfra::Command::Base::MailAlias) }
|
7
|
-
end
|
8
|
-
|
9
5
|
describe mail_alias('daemon') do
|
10
6
|
it { should be_aliased_to "root" }
|
11
7
|
end
|
@@ -2,10 +2,6 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
set :os, :family => 'base'
|
4
4
|
|
5
|
-
describe commands.command_class('package').create do
|
6
|
-
it { should be_an_instance_of(Specinfra::Command::Base::Package) }
|
7
|
-
end
|
8
|
-
|
9
5
|
describe package('jekyll') do
|
10
6
|
it { should be_installed.by('gem') }
|
11
7
|
end
|
data/spec/type/base/port_spec.rb
CHANGED
@@ -2,10 +2,6 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
set :os, :family => 'base'
|
4
4
|
|
5
|
-
describe commands.command_class('port').create do
|
6
|
-
it { should be_an_instance_of(Specinfra::Command::Base::Port) }
|
7
|
-
end
|
8
|
-
|
9
5
|
describe Serverspec::Type::Port do
|
10
6
|
describe port(80) do
|
11
7
|
it { should be_listening }
|
@@ -2,10 +2,6 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
set :os, :family => 'base'
|
4
4
|
|
5
|
-
describe commands.command_class('process').create do
|
6
|
-
it { should be_an_instance_of(Specinfra::Command::Base::Process) }
|
7
|
-
end
|
8
|
-
|
9
5
|
describe process("memcached") do
|
10
6
|
let(:stdout) { " 1407\n" }
|
11
7
|
its(:pid) { should eq 1407 }
|
@@ -2,10 +2,6 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
set :os, :family => 'base'
|
4
4
|
|
5
|
-
describe commands.command_class('routing_table').create do
|
6
|
-
it { should be_an_instance_of(Specinfra::Command::Base::RoutingTable) }
|
7
|
-
end
|
8
|
-
|
9
5
|
describe routing_table do
|
10
6
|
let(:stdout) { "192.168.100.0/24 dev eth1 proto kernel scope link src 192.168.100.10 \r\ndefault via 192.168.100.1 dev eth0 \r\n" }
|
11
7
|
it { should have_entry( :destination => '192.168.100.0/24' ) }
|
data/spec/type/base/user_spec.rb
CHANGED
@@ -2,10 +2,6 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
set :os, :family => 'darwin'
|
4
4
|
|
5
|
-
describe commands.command_class('file').create do
|
6
|
-
it { should be_an_instance_of(Specinfra::Command::Darwin::Base::File) }
|
7
|
-
end
|
8
|
-
|
9
5
|
describe file('/tmp') do
|
10
6
|
it { should be_readable.by_user('mail') }
|
11
7
|
end
|
@@ -2,10 +2,6 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
set :os, :family => 'darwin'
|
4
4
|
|
5
|
-
describe commands.command_class('package').create do
|
6
|
-
it { should be_an_instance_of(Specinfra::Command::Darwin::Base::Package) }
|
7
|
-
end
|
8
|
-
|
9
5
|
describe package('httpd') do
|
10
6
|
it { should be_installed }
|
11
7
|
end
|
@@ -2,10 +2,6 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
set :os, :family => 'darwin'
|
4
4
|
|
5
|
-
describe commands.command_class('port').create do
|
6
|
-
it { should be_an_instance_of(Specinfra::Command::Darwin::Base::Port) }
|
7
|
-
end
|
8
|
-
|
9
5
|
describe Serverspec::Type::Port do
|
10
6
|
describe port(80) do
|
11
7
|
it { should be_listening }
|
@@ -2,10 +2,6 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
set :os, :family => 'debian'
|
4
4
|
|
5
|
-
describe commands.command_class('package').create do
|
6
|
-
it { should be_an_instance_of(Specinfra::Command::Debian::Base::Package) }
|
7
|
-
end
|
8
|
-
|
9
5
|
describe package('httpd') do
|
10
6
|
it { should be_installed }
|
11
7
|
end
|