-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(MODULES-8390) Enable implementations on the init task and hide others #96
Conversation
83a67b0
to
ce52d78
Compare
|
puppetlabs/puppetlabs-service#61 will need the same treatment, but I'm going to wait until this has had some review before repeating it. |
ce52d78
to
904f02b
Compare
.travis.yml
Outdated
| @@ -24,27 +24,21 @@ matrix: | |||
| dist: trusty | |||
| env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_set=docker/centos-7 BEAKER_TESTMODE=apply | |||
| rvm: 2.5.1 | |||
| script: bundle exec rake beaker | |||
| script: bundle exec rake spec_prep beaker | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll need to figure out how to update .sync.yml to make this happen.
Gemfile
Outdated
| @@ -31,6 +31,8 @@ end | |||
| group :system_tests do | |||
| gem "puppet-module-posix-system-r#{minor_version}", require: false, platforms: [:ruby] | |||
| gem "puppet-module-win-system-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw] | |||
|
|
|||
| gem "bolt", '~> 1.4' | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same, .sync.yml
|
@tphoney should I try out solid-waffle here? Update: going to ignore it for now. |
291b3d2
to
4cb7da1
Compare
|
Should be ready now. |
4cb7da1
to
9831be7
Compare
|
Getting task not found error in Jenkins CI. https://jenkins-master-prod-1.delivery.puppetlabs.net/view/All/job/forge-module_puppetlabs-package_intn-sys_smoke-adhoc/PLATFORM=ubuntu1604-64default.a,WORKER_LABEL=beaker/27/console Is it because we have not added a |
Add implementations to the init task so it falls back to non-Ruby implementations when puppet-agent isn't available. Also hide the extra implementations from task runners that implement private tasks and task implementations.
e7e38dd
to
dc02b73
Compare
Previous acceptance tests were stuck on a pre-1.0 version of Bolt that didn't support implementations and rejected the private key. We also never test with the PE install mode from beaker-task_helper. Switch to testing with BoltSpec::Run as the current supported test method.
| apply_manifest_on(default, "package { \"#{package_to_use}\": ensure => present, }") | ||
| result = run('action' => 'uninstall', 'name' => package_to_use) | ||
| expect(result[0]['status']).to eq('success') | ||
| expect(result[0]['result']['action']).to match(%r{uninstall}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MikaelSmith Is this what we expect the structure of the package::windows task to be? I ask because it appears to be different than the linux task and needed to be updated to pass Jenkins CI.
Windows:
24: describe 'install action' do
25: it "install #{package_to_use}" do
26: apply_manifest_on(default, "package { \"#{package_to_use}\": ensure => absent, }")
27: result = run('action' => 'install', 'name' => package_to_use)
28: require 'pry'; binding.pry
=> 29: expect(result[0]['status']).to eq('success')
30: expect(result[0]['result']['action']).to match(%r{install})
31: end
32: end
33:
34: describe 'uninstall action' do
[1] pry(#<RSpec::ExampleGroups::WindowsPackageTask::InstallAction>)> result
=> [{"node"=>"xca8yxo2w8ppx0w.delivery.puppetlabs.net",
"status"=>"success",
"result"=>
{"status"=>"success",
"name"=>"notepadplusplus.install",
"action"=>"install"}}]
linux
28: it 'uninstall rsyslog' do
29: apply_manifest_on(default, "package { 'rsyslog': ensure => present, }")
30: result = run('action' => 'uninstall', 'name' => 'rsyslog')
31: expect(result[0]['status']).to eq('success')
32: require 'pry'; binding.pry
=> 33: expect(result[0]['result']['status']).to match(%r{install})
34: end
35: end
36:
37: describe 'upgrade', if: (fact('operatingsystem') == 'CentOS' && fact('operatingsystemmajrelease') == '7') do
38: it 'upgrade httpd' do
[1] pry(#<RSpec::ExampleGroups::LinuxPackageTask::UninstallAction>)> result
=> [{"node"=>"tjloscdgqw7s81j.delivery.puppetlabs.net",
"status"=>"success",
"result"=>{"status"=>"rsyslog uninstall"}}]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was different. I didn't try to change that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really like either, Windows is probably a bit better. I was going to leave improving them as separate work.
|
CI is failing to install When I |
Unable to reliably install rsyslog on RedHat 6. Skipping rsyslog dependent tests on RedHat 6.
|
Ok this should be good to go when the CJC pr (https://github.com/puppetlabs/ci-job-configs/pull/5453) is merged. https://jenkins-master-prod-1.delivery.puppetlabs.net/job/experimental_auto_puppetlabs-package_intn-sys_full-pe-current-adhoc/ |
Add implementations to the init task so it falls back to non-Ruby
implementations when puppet-agent isn't available. Also hide the extra
implementations from task runners that implement private tasks and task
implementations.