Rename integration tasks

Signed-off-by: Chris Redekop <chris.redekop@d2l.com>
This commit is contained in:
Chris Redekop 2017-02-21 19:26:07 +00:00
parent 88f6e5f716
commit 040d5cbffc

View file

@ -31,21 +31,33 @@ namespace :test do
sh("bundle exec inspec check #{dir}")
end
task :integration_no_cleanup do
task :setup_integration_tests do
integration_dir = "test/integration"
puts "----> Build"
puts "----> Setup"
sh("cd #{integration_dir}/build/ && terraform plan")
sh("cd #{integration_dir}/build/ && terraform apply")
end
puts "----> Verify"
task :run_integration_tests do
integration_dir = "test/integration"
puts "----> Run"
sh("bundle exec inspec exec #{integration_dir}/verify")
end
task :cleanup_integration_tests do
integration_dir = "test/integration"
puts "----> Cleanup"
sh("cd #{integration_dir}/build/ && terraform destroy -force")
end
task :integration do
Rake::Task["test:cleanup"].execute
Rake::Task["test:integration_no_cleanup"].execute
Rake::Task["test:cleanup"].execute
Rake::Task["test:cleanup_integration_tests"].execute
Rake::Task["test:setup_integration_tests"].execute
Rake::Task["test:run_integration_tests"].execute
Rake::Task["test:cleanup_integration_tests"].execute
end
task :cleanup do