diff --git a/Gemfile b/Gemfile index 4b35d33366..17b1b8651a 100644 --- a/Gemfile +++ b/Gemfile @@ -21,6 +21,11 @@ gem "puppetlabs_spec_helper", git: 'https://github.com/puppetlabs/puppetlabs_spec_helper.git', ref: '96a633ebf1a1e88062bf726d4271a3251baf082e' +gem "puppet-resource_api", + git: 'https://github.com/DavidS/puppet-resource_api.git', + ref: 'pup-9747-bolt-attribute-filtering' + + group(:test) do gem "beaker-hostgenerator" gem "gettext-setup", '~> 0.28', require: false diff --git a/spec/fixtures/apply/device_test/tasks/rsapigem.json b/spec/fixtures/apply/device_test/tasks/rsapigem.json new file mode 100644 index 0000000000..c5f3c88c1f --- /dev/null +++ b/spec/fixtures/apply/device_test/tasks/rsapigem.json @@ -0,0 +1,7 @@ +{ + "puppet_task_version": 1, + "supports_noop": false, + "description": "A short description of this task", + "parameters": { + } +} diff --git a/spec/fixtures/apply/device_test/tasks/rsapigem.sh b/spec/fixtures/apply/device_test/tasks/rsapigem.sh new file mode 100644 index 0000000000..6ece8e0191 --- /dev/null +++ b/spec/fixtures/apply/device_test/tasks/rsapigem.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +cd /tmp + +git clone -b pup-9747-bolt-attribute-filtering https://github.com/DavidS/puppet-resource_api.git + +cd puppet-resource_api + +/opt/puppetlabs/puppet/bin/gem build puppet-resource_api + +/opt/puppetlabs/puppet/bin/gem install puppet-resource_api*gem diff --git a/spec/integration/device_spec.rb b/spec/integration/device_spec.rb index 7121154665..65692e0197 100644 --- a/spec/integration/device_spec.rb +++ b/spec/integration/device_spec.rb @@ -68,7 +68,6 @@ def agent_version_inventory end it 'runs a plan that collects facts' do - pending "puppet-resource_api 1.8.3 has incorrect validation that causes these tests to fail" with_tempfile_containing('inventory', YAML.dump(device_inventory), '.yaml') do |inv| results = run_cli_json(%W[plan run device_test::facts --nodes device_targets --modulepath #{modulepath} --inventoryfile #{inv.path}]) @@ -82,7 +81,6 @@ def agent_version_inventory end it 'runs a plan that applies resources' do - pending "puppet-resource_api 1.8.3 has incorrect validation that causes these tests to fail" with_tempfile_containing('inventory', YAML.dump(device_inventory), '.yaml') do |inv| results = run_cli_json(%W[plan run device_test::set_a_val --nodes device_targets diff --git a/spec/lib/bolt_spec/puppet_agent.rb b/spec/lib/bolt_spec/puppet_agent.rb index bb21fd9eb0..ef5c0518ae 100644 --- a/spec/lib/bolt_spec/puppet_agent.rb +++ b/spec/lib/bolt_spec/puppet_agent.rb @@ -39,6 +39,7 @@ def install(target, collection: nil, inventory: nil) task_params = collection ? { 'collection' => collection } : {} result = run_task('puppet_agent::install', target, task_params, config: config, inventory: inventory) + result = run_task('device_test::rsapigem', target, {}, config: config, inventory: inventory) expect(result.count).to eq(1) expect(result[0]).to include('status' => 'success')