Skip to content
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

Use ensure pruned to remove packages in acceptance tests #727

Conversation

h-haaks
Copy link
Contributor

@h-haaks h-haaks commented Apr 3, 2024

Pull Request (PR) description

When trying to figure out mongod.conf package defaults I used server_spec.rb as a base to explore because it leaves the machine in a state where the repo is set up and client/server is not installed.
But on debian/ubuntu when I ran apt install mongodb-org-server it didn't install /etc/mongod.conf ...

Figured the reason to be this combination:

class { 'mongodb::server':
  ensure => absent,
  package_ensure => absent,
}

In this case apt remove is used on mongodb-org-server which don't remove documentation.
As /etc/mongod.conf is treated as docs by apt the file was not removed by apt.
But the mongodb::server::config class removes the apt managed /etc/mongod.conf.
When reinstalling apt still think /etc/mongod.conf is there and won't install it....

@h-haaks h-haaks merged commit 5d80bfa into voxpupuli:master Apr 3, 2024
24 checks passed
@h-haaks h-haaks deleted the use-ensure-pruned-to-remove-packages-in-acceptance-tests branch April 3, 2024 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants