https://www.puppet.com/community logo
Join Slack
Powered by
# voxpupuli
  • b

    bastelfreak

    01/26/2023, 5:00 PM
    @Jethro yes, mongo isnt executed in the unit tests. But we also have acceptance tests, they execute the puppet code in docker containers
  • v

    VoxBot

    01/26/2023, 5:09 PM
    thanks
  • j

    Jethro

    01/26/2023, 6:50 PM
    @bastelfreak is this a solution for the rspec nil output? https://github.com/voxpupuli/puppet-mongodb/pull/662/files#diff-a589b8233f76fc6386e2f6bf77448f1793f582292eb7257fb3b414d0d57094eeR109 at least all test are okay now.
  • v

    VoxBot

    01/26/2023, 7:10 PM
    I'd say it's not a good thing to do - if you mock/stub mongo_eval you should tell it to return something
  • v

    VoxBot

    01/26/2023, 7:11 PM
    so you have that on line 100/101 and you can add .that_returns('...')
  • j

    Jethro

    01/26/2023, 8:06 PM
    Thanks for the tip but I get:
    Copy code
    #12 185.1   1) Puppet::Type::Mongodb_user::ProviderMongodb password_hash= changes a password_hash
    #12 185.1      Failure/Error:
    #12 185.1        allow(provider).to receive(:mongo_eval).
    #12 185.1          with("db.runCommand(#{cmd_json})", 'new_database').that_returns('{"ok": 1}')
    #12 185.1 
    #12 185.1      NoMethodError:
    #12 185.1        undefined method `that_returns' for #<RSpec::Mocks::Matchers::Receive:0x0000563393d80758>
    #12 185.1      # ./spec/unit/puppet/provider/mongodb_user/mongodb_spec.rb:101:in `block (3 levels) in <top (required)>'
  • j

    Jethro

    01/26/2023, 8:08 PM
    Thanks for the tip but I get:
    Copy code
    #12 185.1   1) Puppet::Type::Mongodb_user::ProviderMongodb password_hash= changes a password_hash
    #12 185.1      Failure/Error:
    #12 185.1        allow(provider).to receive(:mongo_eval).
    #12 185.1          with("db.runCommand(#{cmd_json})", 'new_database').that_returns('{"ok": 1}')
    #12 185.1 
    #12 185.1      NoMethodError:
    #12 185.1        undefined method `that_returns' for #<RSpec::Mocks::Matchers::Receive:0x0000563393d80758>
    #12 185.1      # ./spec/unit/puppet/provider/mongodb_user/mongodb_spec.rb:101:in `block (3 levels) in <top (required)>'
  • v

    VoxBot

    01/26/2023, 8:09 PM
    oh yes, it's and_return
  • v

    VoxBot

    01/26/2023, 8:09 PM
    that_returns is mocha
  • v

    VoxBot

    01/26/2023, 8:10 PM
    https://relishapp.com/rspec/rspec-mocks/v/3-12/docs/configuring-responses/returning-a-value
  • j

    Jethro

    01/26/2023, 8:14 PM
    aha thanks! That works! Let me see if i can add a test that catch the failure also so both situations are being tested.
  • s

    Slackbot

    01/26/2023, 8:26 PM
    This message was deleted.
    b
    • 2
    • 1
  • j

    jhoblitt

    01/26/2023, 9:21 PM
    Are we considering SLES12 still supported? https://www.suse.com/lifecycle/ claims that "SUSE Linux Enterprise High Availability Extension 12 SP5" has support until 2027
  • j

    jhoblitt

    01/26/2023, 9:21 PM
    I am not a SLES user so I'm not sure exactly where we draw the line
  • v

    VoxBot

    01/26/2023, 9:27 PM
    I kind of think so, but I don't know people who use SLES
  • v

    VoxBot

    01/26/2023, 9:27 PM
    why?
  • j

    jhoblitt

    01/26/2023, 9:27 PM
    I'm cleanup puppet-systemd's metadata.json and it claims SLES12 support
  • d

    Dr Bunsen Honeydew

    01/26/2023, 9:27 PM
    See the
    puppet-systemd
    module at https://forge.puppet.com/puppet/systemd?src=slack&amp;channel=voxpupuli
  • b

    bastelfreak

    01/26/2023, 9:31 PM
    if sles/suse would just die...
    👍 1
  • v

    VoxBot

    01/26/2023, 9:31 PM
    if we're doing breaking changes there, let me rebase my breaking change PRs
  • j

    jhoblitt

    01/26/2023, 9:31 PM
    we are always doing breaking changes...
  • c

    CVQuesty

    01/26/2023, 9:31 PM
    it is the way of things
  • b

    bastelfreak

    01/26/2023, 9:31 PM
    they have vagrant/container images, but not public on dockerhub
  • j

    jhoblitt

    01/26/2023, 9:31 PM
    debian 8 CI is hosed...
  • v

    VoxBot

    01/26/2023, 9:32 PM
    well yes, Debian 8 is removed from Debian mirrors
  • j

    jhoblitt

    01/26/2023, 9:32 PM
    ya... so I have to deal with it. I'm willing to do a new release of systemd as well after the udev fact is merged.
    ❤️ 1
  • c

    CVQuesty

    01/26/2023, 9:32 PM
    yikes. So SuSE owns Rancher Labs. That might take a minute to die.
  • j

    jhoblitt

    01/26/2023, 9:32 PM
    as I commented on one of the PRs, I really think we should be dropping OS support in a dedicated PR so it shows up clearly in the generated changelog
  • c

    CVQuesty

    01/26/2023, 9:33 PM
    AND it has an SAP specific offering, tuned to supporting SAP Applications
  • s

    Slackbot

    01/26/2023, 9:37 PM
    This message was deleted.
    j
    • 2
    • 1
1...258259260...648Latest