forked from ManageIQ/manageiq-content
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
62 additions
and
0 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 +1,3 @@ | ||
Gemfile.lock | ||
|
||
spec/manageiq |
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,4 @@ | ||
--require manageiq/spec/spec_helper | ||
--require spec_helper | ||
--color | ||
--order random |
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 @@ | ||
source 'https://rubygems.org' | ||
|
||
gemspec | ||
|
||
# Load Gemfile with dependencies from manageiq | ||
eval_gemfile(File.expand_path("spec/manageiq/Gemfile", __dir__)) | ||
|
||
gem "codeclimate-test-reporter", :require => false |
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,28 @@ | ||
#!/usr/bin/env ruby | ||
require 'pathname' | ||
|
||
GEM_ROOT = Pathname.new File.expand_path('../../', __FILE__) | ||
|
||
Dir.chdir(GEM_ROOT) do | ||
if File.exist?("spec/manageiq") | ||
puts "== Updating manageiq sample app ==" | ||
system "cd spec/manageiq && git pull" | ||
else | ||
puts "== Cloning manageiq sample app ==" | ||
system "git clone [email protected]:ManageIQ/manageiq.git --depth 1 spec/manageiq" | ||
end | ||
|
||
puts "== Installing dependencies ==" | ||
system "gem install bundler --conservative" | ||
system "bundle check || bundle install" | ||
|
||
unless File.exist?("spec/manageiq/config/database.yml") | ||
puts "\n== Copying sample config/database.yml ==" | ||
system "cp spec/manageiq/config/database.pg.yml spec/manageiq/config/database.yml" | ||
end | ||
|
||
unless File.exist?("spec/manageiq/certs/v2_key") | ||
puts "\n== Copying sample certs/v2_key ==" | ||
system "cp spec/manageiq/certs/v2_key.dev spec/manageiq/certs/v2_key" | ||
end | ||
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
require 'manageiq-content' | ||
|
||
def require_domain_file | ||
spec_name = caller_locations.first.path | ||
file_name = spec_name.sub("spec/", "").sub("_spec.rb", ".rb") | ||
|
||
require file_name | ||
end | ||
|
||
RSpec.configure do |config| | ||
config.include Spec::Support::AutomationHelper | ||
|
||
config.before(:suite) do | ||
puts "** Resetting #{ENV["AUTOMATE_DOMAINS"]} domain(s)" | ||
Tenant.seed | ||
MiqAeDatastore.reset | ||
MiqAeDatastore.reset_to_defaults | ||
end | ||
|
||
config.after(:suite) do | ||
MiqAeDatastore.reset | ||
end | ||
end |