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

    Yury Bushmelev

    12/15/2022, 12:41 PM
    now I should understand what is the dialect I should write the spec in.. as beaker vs beaker-spec is confusing.. I was expecting beaker is execution and provisioning tool which runs the rspec (with beaker-rspec) for the acceptance test.. but it seems those are different dialects of rspec 🤔
  • b

    bastelfreak

    12/15/2022, 12:42 PM
    check https://serverspec.org/ for all the matchers
  • b

    bastelfreak

    12/15/2022, 12:42 PM
    and I never really tried to "learn" rspec/the dialect. My knowledge grew through reading existing tests and poking ewoud and @Alex Fisher
  • y

    Yury Bushmelev

    12/15/2022, 12:43 PM
    I learned the rspec-puppet in the same way (by poking nearest puppet master while ago)
  • y

    Yury Bushmelev

    12/15/2022, 12:44 PM
    shall I use
    voxpupuli-acceptance
    helpers? or not really needed?
  • y

    Yury Bushmelev

    12/15/2022, 12:45 PM
    shall I use
    voxpupuli-acceptance
    helpers? or not really needed?
  • b

    bastelfreak

    12/15/2022, 12:46 PM
    we use them and they are fine. I don't see a reason not to use them
  • y

    Yury Bushmelev

    12/15/2022, 12:50 PM
    then I can use rake task instead of calling beaker it seems.. well, let me try this way
  • m

    Marty Ewings

    12/15/2022, 3:55 PM
    @bastelfreak wee bit of more info, on our facterdb discussion, the use case is to use the returned facts to ensure a package selector in the code selects a package specific for RHEL Minor version.
  • m

    Marty Ewings

    12/15/2022, 3:55 PM
    is this usecase you would consider if i where to raise a request to the gems to consider OS minor versions?
  • m

    Marty Ewings

    12/15/2022, 3:57 PM
    my thoughts are perhaps this would be something better tested in acceptance
  • m

    Marty Ewings

    12/15/2022, 3:57 PM
    and not in unit
  • b

    bastelfreak

    12/15/2022, 3:58 PM
    agreed. I would test that with an acceptance test or mock the fact in a unit test. But if someone want's to implement support in facterdb for that, I would be fine with it.
  • m

    Marty Ewings

    12/15/2022, 3:59 PM
    ok ill discuss and see if anyone in CAT can spare some time to make such a change, probably in rspect-puppet-facts, facterdb would just need some data files properly named correct?
  • b

    bastelfreak

    12/15/2022, 4:01 PM
    it probably needs some logic adjustments because it assumes something like os-arch-major.json I think
  • b

    bastelfreak

    12/15/2022, 4:01 PM
    also does metadata.json even support minor versions in the schema? or doesn't the customer want to use that
  • b

    bastelfreak

    12/15/2022, 4:02 PM
    a spec test can also do an explicit lookup in facterdb, you don't have to iterate on everything in metadata.json
  • m

    Marty Ewings

    12/15/2022, 5:08 PM
    the majorversionfeild in metadata.json looked into this yesterday, its just a string to “do what makes sense for your OS”
  • y

    Yury Bushmelev

    12/16/2022, 7:10 AM
    Yay! beaker works for me! 🎉
  • y

    Yury Bushmelev

    12/16/2022, 7:11 AM
    Yay! beaker works for me! 🎉
  • y

    Yury Bushmelev

    12/16/2022, 7:12 AM
    I was able to run the acceptance test on my M1 (with docker HV which is emulated by podman running in a lima-vm)!
    Copy code
    BEAKER_setfile=ubuntu2004-AARCH64 pdk bundle exec rake beaker
  • y

    Yury Bushmelev

    12/16/2022, 7:17 AM
    time to write it down somewhere..
  • b

    bastelfreak

    12/16/2022, 7:31 AM
    @Yury Bushmelev maybe a conference talk? :)
    👍 1
  • b

    bastelfreak

    12/16/2022, 7:32 AM
    it would be awesome id you could wrire a small blogpost for voxpupuli.org or enhance the voxpupuli-acceptance readme.md with the steps you took to enable it
  • y

    Yury Bushmelev

    12/16/2022, 8:37 AM
    I’m considering it 🙂
  • y

    Yury Bushmelev

    12/16/2022, 8:42 AM
    hm.. beaker specs are not using
    context
    🤔 is it intentional? or just happens this way?
  • y

    Yury Bushmelev

    12/16/2022, 8:44 AM
    in puppet rspec it’s usually one
    describe
    per manifest and multiple
    context
    blocks inside which changes the resource behaviour
  • m

    Marty Ewings

    12/16/2022, 9:13 AM
    @bastelfreak this may be going too far back to camptocamp ownership, but anyideas why openbsd gets special treatment in rspec-puppet-facts, it looks like this commit https://github.com/voxpupuli/rspec-puppet-facts/commit/a4c93806d9b911b2af28727af1cf7ab647e1af99 was what put in the default of “major version only” but there was logic to leave out openbsd, looks like openbsd will map whole release name not just majpr version
  • m

    Marty Ewings

    12/16/2022, 9:15 AM
    also it looks like i could just copy this code for a RHEL exception
  • m

    Marty Ewings

    12/16/2022, 9:15 AM
    i think facterdb just needs the files, its just the OS iterator here that needs a tweak
1...217218219...648Latest