(PDOC-63) Restore acceptance test to the spec directory.
Previously the acceptance test was implemented under the `spec` directory and was moved out to a top level `acceptance` directory. This broke the expected location for the node configuration files. This commit puts the acceptance test back where it was previously. Also fixes a failure in the test now that Markdown is the default markup language used.
This commit is contained in:
parent
0b682d5710
commit
e5577e199c
11
Rakefile
11
Rakefile
|
@ -24,12 +24,13 @@ task :acceptance do
|
|||
target = ENV['platform']
|
||||
if ! target
|
||||
STDERR.puts 'TEST_TARGET environment variable is not set'
|
||||
STDERR.puts 'setting to default value of "centos7-64ma."'
|
||||
target = 'centos7-64ma.'
|
||||
STDERR.puts 'setting to default value of "centos7-64ma".'
|
||||
target = 'centos7-64ma'
|
||||
ENV['platform'] = target
|
||||
end
|
||||
|
||||
cli = BeakerHostGenerator::CLI.new([target])
|
||||
nodeset_dir = 'acceptance/nodesets'
|
||||
nodeset_dir = 'spec/acceptance/nodesets'
|
||||
nodeset = "#{nodeset_dir}/#{target}.yml"
|
||||
FileUtils.mkdir_p(nodeset_dir)
|
||||
File.open(nodeset, 'w') do |fh|
|
||||
|
@ -37,8 +38,8 @@ task :acceptance do
|
|||
end
|
||||
puts nodeset
|
||||
sh 'gem build puppet-strings.gemspec'
|
||||
sh 'puppet module build acceptance/fixtures/modules/test'
|
||||
sh "BEAKER_set=#{ENV['platform']} rspec acceptance/*.rb"
|
||||
sh 'puppet module build spec/fixtures/acceptance/modules/test'
|
||||
sh "BEAKER_set=#{ENV['platform']} rspec spec/acceptance/*.rb"
|
||||
end
|
||||
|
||||
task(:rubocop) do
|
||||
|
|
|
@ -19,7 +19,7 @@ describe 'Generating module documentation using generate action' do
|
|||
end
|
||||
|
||||
it 'should generate documentation for 3x functions' do
|
||||
expect(read_file_on(master, '/root/doc/puppet_functions_ruby3x/function3x.html')).to include('This is the function documentation for function3x')
|
||||
expect(read_file_on(master, '/root/doc/puppet_functions_ruby3x/function3x.html')).to include('This is the function documentation for <code>function3x</code>')
|
||||
end
|
||||
|
||||
it 'should generate documentation for 4x functions' do
|
|
@ -1,3 +1,2 @@
|
|||
Puppet::Parser::Functions.newfunction(:function3x, :doc => "This is the
|
||||
function documentation for `function3x`") do |args|
|
||||
Puppet::Parser::Functions.newfunction(:function3x, :doc => "This is the function documentation for `function3x`") do |args|
|
||||
end
|
|
@ -15,7 +15,7 @@ RSpec.configure do |c|
|
|||
scp_to(host, Dir.glob('puppet-strings*.gem').first, 'puppet-strings.gem')
|
||||
on host, 'gem install puppet-strings.gem'
|
||||
|
||||
scp_to(host, Dir.glob('acceptance/fixtures/modules/test/pkg/username-test*.gz').first, 'test.tar.gz')
|
||||
scp_to(host, Dir.glob('spec/fixtures/acceptance/modules/test/pkg/username-test*.gz').first, 'test.tar.gz')
|
||||
on host, puppet('module', 'install', 'test.tar.gz')
|
||||
|
||||
on host, 'gem install yard'
|
||||
|
|
Loading…
Reference in New Issue