(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:
Peter Huene 2016-09-16 15:01:21 -07:00
parent 0b682d5710
commit e5577e199c
No known key found for this signature in database
GPG Key ID: 6B585C1742BE3C3C
8 changed files with 9 additions and 9 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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'