-
-
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.
Merge pull request #275 from paybyphone/windows_data_path
Windows data path
- Loading branch information
Showing
7 changed files
with
106 additions
and
5 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
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
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,3 +1,8 @@ | ||
require 'serverspec' | ||
|
||
set :backend, :exec | ||
if (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM).nil? | ||
set :backend, :exec | ||
else | ||
set :backend, :cmd | ||
set :os, family: 'windows' | ||
end |
40 changes: 40 additions & 0 deletions
40
test/integration/windefault/serverspec/localhost/default_spec.rb
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
require 'spec_helper' | ||
|
||
describe file('C:\Program Files\consul\consul.exe') do | ||
it { should be_file } | ||
end | ||
|
||
describe service('consul') do | ||
it { should be_enabled } | ||
it { should be_running } | ||
end | ||
|
||
[8300, 8400, 8500, 8600].each do |p| | ||
describe port(p) do | ||
it { should be_listening } | ||
end | ||
end | ||
|
||
describe command('& "C:\Program Files\consul\consul.exe" members -detailed') do | ||
its(:exit_status) { should eq 0 } | ||
its(:stdout) { should match %r{\balive\b} } | ||
its(:stdout) { should match %r{\brole=consul\b} } | ||
its(:stdout) { should match %r{\bbootstrap=1\b} } | ||
its(:stdout) { should match %r{\bdc=fortmeade\b} } | ||
end | ||
|
||
config_file = 'C:\Program Files\consul\consul.json' | ||
config_dir = 'C:\Program Files\consul\conf.d' | ||
data_dir = 'C:\Program Files\consul\data' | ||
|
||
describe file(config_file) do | ||
it { should be_file } | ||
end | ||
|
||
describe file(config_dir) do | ||
it { should be_directory } | ||
end | ||
|
||
describe file(data_dir) do | ||
it { should be_directory } | ||
end |
11 changes: 11 additions & 0 deletions
11
test/integration/windefault/serverspec/localhost/logging_spec.rb
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
require 'spec_helper' | ||
|
||
context 'logging' do | ||
describe file('C:\foo\bar\out.log') do | ||
it { should be_file } | ||
end | ||
|
||
describe file('C:\foo\bar\err.log') do | ||
it { should be_file } | ||
end | ||
end |