Pārlūkot izejas kodu

test(inspec): update `system.rb` from template with gentoo support

master
Benjamin Neff pirms 4 gadiem
vecāks
revīzija
54c40c6d95
Revīzijas autora e-pasta adrese nav piesaistīta nevienam kontam
1 mainītis faili ar 11 papildinājumiem un 0 dzēšanām
  1. +11
    -0
      test/integration/share/libraries/system.rb

+ 11
- 0
test/integration/share/libraries/system.rb Parādīt failu

@@ -49,11 +49,22 @@ class SystemResource < Inspec.resource(1)
inspec.platform[:release].gsub(/2018.*/, '1')
when 'arch'
'base-latest'
when 'gentoo'
"#{inspec.platform[:release].split('.')[0]}-#{derive_gentoo_init_system}"
else
inspec.platform[:release]
end
end

def derive_gentoo_init_system
case inspec.command('systemctl').exist?
when true
'sysd'
else
'sysv'
end
end

def build_platform_finger
"#{build_platform_name}-#{build_finger_release}"
end

Notiek ielāde…
Atcelt
Saglabāt