-
-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
serverspec2.0 added and consul_ui test fixed
Current server spec installation will use 2.0 - which means i have to change spec_helper and matchers. Also consul uses the ui with an extra relative folder consul_ui - that had to be fixed for server spec to pass
- Loading branch information
1 parent
4afbc3e
commit 122e6e5
Showing
5 changed files
with
22 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,8 @@ bin/* | |
.kitchen.local.yml | ||
|
||
coverage/ | ||
|
||
vendor/ruby/2.0.0/build_info/addressable-2.3.6.info | ||
|
||
vendor/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,3 @@ | ||
require 'serverspec' | ||
|
||
include SpecInfra::Helper::Exec | ||
include SpecInfra::Helper::DetectOS | ||
|
||
RSpec.configure do |c| | ||
c.path = '/usr/local/bin:/sbin:/bin:/usr/bin' | ||
end | ||
set :backend, :exec | ||
set :path, '/usr/local/bin:/bin:/sbin:/usb/sbin:$PATH' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
require 'spec_helper' | ||
|
||
describe file('/var/lib/consul/ui/index.html') do | ||
describe file('/var/lib/consul/ui/consul_ui/index.html') do | ||
it { should be_file } | ||
end | ||
|
||
eth0_ip = command("/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'").stdout.strip | ||
describe command("wget -q -O- http://#{eth0_ip}:8500/ui/index.html") do | ||
it { should return_exit_status 0 } | ||
its(:stdout) { should == File.read('/var/lib/consul/ui/index.html') } | ||
describe command("wget -q -O- http://#{eth0_ip}:8500/ui/consul_ui/index.html") do | ||
its(:exit_status) { should eq 0 } | ||
its(:stdout) { should eq File.read('/var/lib/consul/ui/consul_ui/index.html') } | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,3 @@ | ||
begin | ||
require 'rspec/its' | ||
rescue LoadError | ||
require 'rubygems/dependency_installer' | ||
Gem::DependencyInstaller.new.install('rspec-its') | ||
require 'rspec/its' | ||
end | ||
|
||
require 'serverspec' | ||
|
||
include SpecInfra::Helper::Exec | ||
include SpecInfra::Helper::DetectOS | ||
|
||
RSpec.configure do |c| | ||
c.path = '/usr/local/bin:/sbin:/bin:/usr/bin' | ||
end | ||
set :backend, :exec | ||
set :path, '/usr/local/bin:/bin:/sbin:/usb/sbin:$PATH' |