Prepare noop tests for external fixtures
Backwards compatible change to prepare the noop tests to consume external fixtures from the .fixtures.yml file Partial blueprint deployment-data-dryrun Change-Id: I4ddb580d1179caa81d0320520bccbe9f6e11c5c1 Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
This commit is contained in:
parent
e4b0a3c53d
commit
065a69babb
4
tests/noop/.fixtures.yml
Normal file
4
tests/noop/.fixtures.yml
Normal file
@ -0,0 +1,4 @@
|
||||
fixtures:
|
||||
repositories:
|
||||
#TODO(bogdando) enable once switched to external fixtures
|
||||
#fuel-noop-fixtures: "git://github.com/openstack/fuel-noop-fixtures.git"
|
1
tests/noop/.gitignore
vendored
1
tests/noop/.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
deprecations.log
|
||||
Gemfile.lock
|
||||
coverage
|
||||
spec/fixtures
|
||||
|
@ -1,4 +1,5 @@
|
||||
require 'rspec/core/rake_task'
|
||||
require 'puppetlabs_spec_helper/rake_tasks'
|
||||
|
||||
RSpec::Core::RakeTask.new(:spec) do |t|
|
||||
t.rspec_opts = '--deprecation-out deprecations.log --color --tty --format documentation'
|
||||
|
@ -265,6 +265,19 @@ module NoopTests
|
||||
"'#{File.join TEST_LIBRARY_DIR, spec}'"
|
||||
end
|
||||
|
||||
# run the rake spec_prep to get fixtures
|
||||
# return: success
|
||||
# @return success
|
||||
def self.rake_prep
|
||||
inside_noop_tests_directory do
|
||||
command_prep = "rake spec_prep"
|
||||
command_prep = 'bundle exec ' + command_prep if options[:bundle]
|
||||
debug " RUN: #{command_prep}"
|
||||
system command_prep
|
||||
$?.exitstatus == 0
|
||||
end
|
||||
end
|
||||
|
||||
# run the rspec commands with some options
|
||||
# return: [ success, report ]
|
||||
# @param [String] spec Spec file or pattern
|
||||
@ -533,6 +546,9 @@ module NoopTests
|
||||
exit 0
|
||||
end
|
||||
|
||||
# ensure fixtures
|
||||
rake_prep
|
||||
|
||||
if options[:missing_specs]
|
||||
missing_specs = puppet_tasks_without_specs
|
||||
if missing_specs.any?
|
||||
|
Loading…
Reference in New Issue
Block a user