浏览代码

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

master
Benjamin Neff 4 年前
父节点
当前提交
54c40c6d95
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 11 次插入0 次删除
  1. +11
    -0
      test/integration/share/libraries/system.rb

+ 11
- 0
test/integration/share/libraries/system.rb 查看文件

@@ -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

正在加载...
取消
保存