-
Notifications
You must be signed in to change notification settings - Fork 1
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 #2 from liatrio-chef/20161020_Update
Fixed CHILD_STATUS
- Loading branch information
Showing
12 changed files
with
106 additions
and
77 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
source "https://supermarket.chef.io" | ||
source 'https://supermarket.chef.io' | ||
|
||
metadata | ||
|
||
|
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,26 +1,24 @@ | ||
require 'minitest/spec' | ||
|
||
def service_is_listening( port, service ) | ||
def service_is_listening(port, service) | ||
assert system "sudo netstat -lp --numeric-ports | grep \":#{port}.*LISTEN.*#{service}\"" | ||
end | ||
|
||
def web_check_match( url, check ) | ||
def web_check_match(url, check) | ||
assert system "wget -q -O - #{url} | grep '#{check}'" | ||
end | ||
|
||
describe_recipe 'jenkins-liatrio::default' do | ||
# use port attribute for this | ||
# it "listens for http on tcp port 8080" do | ||
# service_is_listening("8080", "java") | ||
# end | ||
|
||
# use port attribute for this | ||
# it "listens for http on tcp port 8080" do | ||
# service_is_listening("8080", "java") | ||
# end | ||
|
||
#it 'must match the web check Apache' do | ||
# it 'must match the web check Apache' do | ||
# web_check_match("http://127.0.0.1/", "Apache") | ||
#end | ||
|
||
# it should test for each plugin attribute that it is installed | ||
# end | ||
|
||
# it should test that each job was created | ||
# it should test for each plugin attribute that it is installed | ||
|
||
# it should test that each job was created | ||
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
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
require 'chefspec' | ||
require 'chefspec/berkshelf' |
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,30 @@ | ||
# | ||
# Cookbook Name: jenkins-liatrio | ||
# Spec::default | ||
require 'spec_helper' | ||
|
||
describe 'jenkins-liatrio::default' do | ||
let(:chef_run) do | ||
ChefSpec::SoloRunner.new( | ||
platform: 'centos', | ||
version: '7.2.1511' | ||
).converge(described_recipe) | ||
end | ||
|
||
it 'includes jenkins::master recipe' do | ||
expect(chef_run).to include_recipe('jenkins::master') | ||
end | ||
|
||
it 'creates jenkins\' .m2 directory' do | ||
expect(chef_run).to create_directory('/var/lib/jenkins/.m2').with( | ||
mode: '0755' | ||
) | ||
end | ||
|
||
it 'places the settings.xml file in \'etc/maven/\'' do | ||
expect(chef_run).to create_template('/etc/maven/settings.xml').with( | ||
source: 'etc/maven/settings.xml.erb', | ||
mode: '0755' | ||
) | ||
end | ||
end |