voxpupuli / puppet-yum

Puppet module for Yum
https://forge.puppet.com/puppet/yum
MIT License
16 stars 101 forks source link

CI tests fail for OracleLinux 7 #323

Closed EmersonPrado closed 4 months ago

EmersonPrado commented 1 year ago

My PR #320 fails for OracleLinux 7, in Puppet 7 and 8. It gives 2 errors:

The first one points to a needed but disabled repository:

yum::post_transaction_action define simple parameters must work idempotently with no errors
Yum::Plugin::Post_transaction_actions
Yum::Plugin[post-transaction-actions]
Package[yum-plugin-post-transaction-actions]
Execution of '/usr/bin/yum -d 0 -e 0 -y install yum-plugin-post-transaction-actions'
returned 1: Error: Nothing to do

# Manual test
/usr/bin/yum -d 0 -e 0 -y --enablerepo=ol7_optional_latest install yum-plugin-post-transaction-actions
rpm -q yum-plugin-post-transaction-actions
yum-plugin-post-transaction-actions-1.1.31-54.0.1.el7_8.noarch

The other one points to a possibly missing package for OracleLinux:

yum::post_transaction_action define simple parameters File "/tmp/vim-installed" is expected to be file
     Failure/Error: it { is_expected.to be_file }
       expected `File "/tmp/vim-installed".file?` to be truthy, got false

# Manual intervention
sed -i 's/\(enabled\)=0/\1=1/' /etc/yum.repos.d/*.repo
yum clean all ; yum repolist
yum provides /tmp/vim-installed
No matches found

I'm not quite experimented in such tests, but I think the solution is:

EmersonPrado commented 4 months ago

Solved in CI tests setup