This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Add serverspec and basic spec

Creates the basic serverspec implementation and runs it after the
Boxen run.
  • Loading branch information...
jacobbednarz committed Jan 9, 2017
1 parent 51eb49b commit a6727c4f4d443a6511c5a1d4f9bac1a1b45923ae
View
3 .rspec
@@ -0,0 +1,3 @@
--color
--format documentation
--order random
View
@@ -4,6 +4,7 @@ script:
- rvm implode --force
- ./script/boxen --no-fde --no-pull
- source /opt/boxen/env.sh
- rake spec
before_install:
- sudo gem install bundler -v '~> 1.13'
env:
View
@@ -11,6 +11,10 @@ gem "rake", "10.3.2"
gem "rspec-puppet", "1.0.1"
gem "deep_merge", "~> 1.0"
group :test do
gem "serverspec"
end
group :development do
gem "aws-sdk-core", "~> 2.0.11"
gem "net-ssh"
View
@@ -41,7 +41,10 @@ GEM
metaclass (~> 0.0.1)
multi_json (1.11.0)
multipart-post (2.0.0)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (2.9.2)
net-telnet (0.1.1)
octokit (2.7.2)
sawyer (~> 0.5.2)
open4 (1.3.4)
@@ -65,6 +68,9 @@ GEM
rspec-expectations (3.2.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.2.0)
rspec-its (1.2.0)
rspec-core (>= 3.0.0)
rspec-expectations (>= 3.0.0)
rspec-mocks (3.2.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.2.0)
@@ -74,6 +80,17 @@ GEM
sawyer (0.5.5)
addressable (~> 2.3.5)
faraday (~> 0.8, < 0.10)
serverspec (2.37.2)
multi_json
rspec (~> 3.0)
rspec-its
specinfra (~> 2.53)
sfl (2.3)
specinfra (2.66.3)
net-scp
net-ssh (>= 2.7, < 4.0)
net-telnet
sfl
thor (0.19.1)
PLATFORMS
@@ -92,3 +109,7 @@ DEPENDENCIES
puppetlabs_spec_helper (= 0.4.1)
rake (= 10.3.2)
rspec-puppet (= 1.0.1)
serverspec
BUNDLED WITH
1.10.5
View
@@ -0,0 +1,27 @@
require 'rake'
require 'rspec/core/rake_task'
task :spec => 'spec:all'
task :default => :spec
namespace :spec do
targets = []
Dir.glob('./spec/*').each do |dir|
next unless File.directory?(dir)
target = File.basename(dir)
target = "_#{target}" if target == "default"
targets << target
end
task :all => targets
task :default => :all
targets.each do |target|
original_target = target == "_default" ? target[1..-1] : target
desc "Run serverspec tests to #{original_target}"
RSpec::Core::RakeTask.new(target.to_sym) do |t|
ENV['TARGET_HOST'] = original_target
t.pattern = "spec/#{original_target}/*_spec.rb"
end
end
end
@@ -0,0 +1,5 @@
require 'spec_helper'
describe file('/opt/boxen/repo') do
it { should be_directory }
end
View
@@ -0,0 +1,4 @@
require 'serverspec'
set :backend, :exec
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
Binary file not shown.

0 comments on commit a6727c4

Please sign in to comment.