This message was deleted.
# office-hours
s
This message was deleted.
👀 1
j
hey @Pat Riehecky
we'll need the failing spec tests addressed before moving forward
p
I'm not sure how to fix it...
j
lemme see whats happening
j
Ah i see now..
Interested in the approach you opted for to exclude redhat from the tests. something that might be easier to read/cleaner way of executing is updating
next if OS_FAMILY_WITHOUT_BZR.include?(os[:family])
to
next unless os[:family] != 'RedHat'
should help eliminate the error whilst helping the readability 🙂
p
In theory I've pushed up that change
j
kay, i've approved the tests fingerscrossed
p
❤️
j
couple of rubocop errors
all pretty minor
hopefully can be autocorrected with
bundle exec rubocop -A
p
Alas,
Lint/LiteralAsCondition
doesn't seem to support it
j
two secs, im going to pull this down @Pat Riehecky
okay cool, spotted the issue. This should work
next if os.match?('redhat')
and will match the value passed to os (like
redhat-7-x86_64
) Both rubocop and spec tests passing locally now. 🙂
p
Will that work with things like alma/rocky/fedora?
j
yes 🙂 alma and rocky won't match that value and will execute
verified this there now 🙂 cant speak for Fedora unfortunately
but I would assume it is OK as well
p
Alas, alma/rocky/fedora don't have the
bzr
package either
j
ah... spanner in the works. well the condition will need updated to match their values passed as
os
as well.
alma follows the pattern
almalinux-...
rocky follows the pattern
rocky-
fedora shouldnt appear as it is not listed as a supported OS
tested and the following pattern works
next if os.match?('redhat|almalinux|rocky')
p
I think I've got it updated in future proof mode (if fedora gets added at some point)
j
👀
got green specs 🤞
although it does seem to be running on those OS
p
how odd...
j
os_facts[:family]
returns nil
p
boo
I'll just drop the
bzr
bits for now
I don't actually use it
j
this does work and skips the OS's
next if os.match?('redhat|almalinux|rocky')
but only a suggestion
🙂
p
There is also Amazon Linux, Oracle, Scientific, and a few others
j
yeah.. in that case it would be better to match the OS you want to test rather than exclude. But yeah, that can get messy quickly
p
In theory this will pass
r
Why not match on family and just skip all rhel-like?