Git Product home page Git Product logo

beaker-puppet's People

Contributors

bastelfreak avatar caseywilliams avatar cthorn42 avatar dakta avatar dependabot[bot] avatar ekinanp avatar ekohl avatar gabrielnagy avatar genebean avatar gimmyxd avatar joshcooper avatar justinstoller avatar kevpl avatar kris-bosland avatar lucywyman avatar magisus avatar melissa avatar mhashizume avatar mihaibuzgau avatar mwaggett avatar pcarlisle avatar puppetlabs-jenkins avatar scottgarman avatar smcelmurry avatar smortex avatar span786 avatar speedofdark avatar trevor-vaughan avatar tvpartytonight avatar yachub avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

beaker-puppet's Issues

Recent changes broke install_puppet_agent_pe_promoted_repo_on

We use the install_puppet_agent_pe_promoted_repo_on method to test installing older puppet-agents and test them out against new PE environments setup with newer puppetservers.
A recent change to the install_puppet_agent_pe_promoted_repo_on recently broke installing older agents (pre PE 2019.0 at least).
I believe the break down is in the method we changed how the puppet_collection is set.
We use to use the install path as this when the agent version is puppet_agent_version=>"5.5.3":
/root/repos/el/7/PC1/x86_64/puppet-agent-*.rpm
Which use to work, but now when we attempt to install we're using this:
/root/repos/el/7/puppet5/x86_64/puppet-agent-*.rpm
Notice the change from PC1 to puppet5, which looks to break things.

Migrate gem back to puppetlabs

This gem was migrated together with all other beaker gems. Back then it was used by Vox Pupuli, but now we've migrated to beaker_puppet_helpers which is a really stripped down version of this gem.

beaker-puppet contains a lot of logic to test puppetserver and the only user of that is puppetlabs. That's why I'm proposing to migrate it back.

`ci:test:aio` skips the `post-suite` if any tests fail, but `ci:test:aio[true]` doesn't

Describe the Bug

When running the ci:test:aio rake task (with retries disabled), if any test fails, then the post-suite is skipped:

beaker-puppet/tasks/ci.rake

Lines 320 to 323 in 5f0984a

beaker(:exec, ENV.fetch('TESTS', nil))
beaker(:exec, 'post-suite')
ensure
preserve_hosts = ENV['OPTIONS'].include?('--preserve-hosts=always') if ENV['OPTIONS']

This is because beaker(:exec, ...) raises if any test fails and the post-suite isn't in an ensure block.

However, ci:test:aio[true] (with retries enabled) does execute the post-suite, because it's been moved to the ensure block.

beaker-puppet/tasks/ci.rake

Lines 348 to 349 in 5f0984a

ensure
beaker(:exec, 'post-suite')

Expected Behavior

The post-suite should always be executed irrespective of whether retries are enabled or not.

Also if the post-suite fails/raises, then we should ensure hosts are still destroyed too

Steps to Reproduce

Steps to reproduce the behavior:

git clone https://github.com/puppetlabs/facter
cd facter
patch -p1 << 'EOF' 
diff --git a/acceptance/tests/load_libfacter.rb b/acceptance/tests/load_libfacter.rb
index 1bc61ffd1..fe93a25bb 100644
--- a/acceptance/tests/load_libfacter.rb
+++ b/acceptance/tests/load_libfacter.rb
@@ -2,6 +2,8 @@
 test_name 'C100161: Ruby can load libfacter without raising an error' do
   tag 'risk:high'

+  raise "Whoops"
+
   require 'puppet/acceptance/common_utils'
   extend Puppet::Acceptance::CommandUtils
EOF
cd acceptance
bundle install
bundle exec rake ci:test:aio SHA=8.4.0 TESTS=tests/load_libfacter.rb HOSTS=redhat8-64a
...
...notice `bundle exec beker exec post-suite` is never executed
...

But when retries are enabled, the post-suite is executed:

bundle exec rake 'ci:test:aio[true]' SHA=8.4.0 TESTS=tests/load_libfacter.rb HOSTS=redhat8-64a

Environment

bundle exec gem list

*** LOCAL GEMS ***

ansi (1.5.0)
ast (2.4.2)
bcrypt_pbkdf (1.1.0)
beaker (4.41.2)
beaker-abs (0.11.0)
beaker-hostgenerator (2.9.0)
beaker-puppet (1.29.0)
beaker-vagrant (0.7.1)
beaker-vmpooler (1.4.0)
bundler (2.4.19)
commander (4.6.0)
deep_merge (1.2.2)
ed25519 (1.3.0)
faraday (1.10.3)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-multipart (1.0.4)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
highline (2.0.3)
hocon (1.4.0)
in-parallel (0.1.17)
inifile (3.0.0)
minitar (0.9)
minitest (5.21.2)
multi_json (1.15.0)
multipart-post (2.3.0)
net-scp (4.0.0)
net-ssh (7.2.1)
oga (3.4)
rake (13.1.0)
rexml (3.2.6)
rsync (1.0.9)
ruby-ll (2.1.3)
ruby2_keywords (default: 0.0.5)
stringify-hash (0.0.2)
thor (1.3.0)
vmfloaty (1.8.1)

Let me inject the cmdline_args parameter for the install_package method

I want to use the cmdline_args parameter of the host.install_package method on install_puppet_agent_on to inject the argument "-o Dpkg::Options::='--force-confold'".
I have some files already present that are also inside the puppet agent package and right now beaker gets stuck on the interactive apt install dialog where it asks me if it is okay to overwrite these files.

It is the second parameter of this method call:
https://github.com/voxpupuli/beaker-puppet/blob/0d4080c8f3c57dbcb87cc296a3164b006b7b3eea/lib/beaker-puppet/install_utils/foss_utils.rb#L437

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.