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

rspec: Remove Puppet::Util::Storage mock #42

Merged
merged 1 commit into from
Dec 16, 2022

Conversation

lollipopman
Copy link
Contributor

@lollipopman lollipopman commented Dec 15, 2022

In attempting to upgrade https://github.com/bodgit/puppet-postfix's dependency on this
module, I received the following error:

  Failure/Error: allow(Puppet::Util::Storage).to receive(:store)
    The use of doubles or partial doubles from rspec-mocks outside
    of the per-test lifecycle is not supported.

This appears to be the result of the change in
637108e to use a mock rather than a stub. However, it is not clear to me why Puppet::Util::Storage needs to
be mocked, as all tests still pass in this module and puppet-postfix
without it, so remove.

In attempting to upgrade bodgit/puppet-postfix's[^1] dependency on this
module, I received the following error:

  Failure/Error: allow(Puppet::Util::Storage).to receive(:store)
    The use of doubles or partial doubles from rspec-mocks outside
    of the per-test lifecycle is not supported.

This appears to be the result of the change in
637108e to use a mock rather than a
stub. However, it is not clear to me why Puppet::Util::Storage needs to
be mocked, as all tests still pass in this module and puppet-postfix
without it, so remove.

[1]: https://github.com/bodgit/puppet-postfix
Copy link
Member

@smortex smortex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If CI is happy, this is probably useless 😄

@ekohl ekohl merged commit cc3a3db into voxpupuli:master Dec 16, 2022
@lollipopman
Copy link
Contributor Author

thanks @smortex!

wmfgerrit pushed a commit to wikimedia/operations-puppet that referenced this pull request Dec 21, 2022
This commit adds a vendored module:

  https://github.com/bodgit/puppet-postfix

Along with its dependencies. This module and its dependencies are
licensed under the Apache-2.0 license.

Three additional patches on top of upstream have been added, which are
open pull requests:

  1. Add Debian Bullseye(11) support
  2. Fix support for /etc/aliases
  3. Debian: don't install Augeas lens for unix-dgram

This module has been used to build a testing configuration for replacing
our existing use of Exim. Thus far it seems to be a well built module
and is worth vendoring based on my review of the code.

Dependencies:

1.  `bodgit/bodgitlib`:

    Unneeded currently, used for ldap, memcache, mysql, & pgsql lookups,
    we could always add it if we started using those postfix lookup
    types.

2.  `herculesteam/augeasproviders_core`:

    Alternative Augeas provider module which is now under Voxpupuli,
    this will be updated to their version once a new version is cut
    which includes my recent pull request,
    <voxpupuli/puppet-augeasproviders_core#42>

3.  `camptocamp/augeas`:

    Unneeded, as we already have the updated postfix lens

Bug: T325396
Change-Id: I1f50481e6f06ba802c90c7b94057eacb71c10582
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.

3 participants