Repos with recipes to deploy some infrastructure services
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 

33 行
961 B

  1. debian_os = ['debian', 'ubuntu']
  2. rhel_os = ['redhat', 'centos']
  3. def test_repo_file(host):
  4. f = None
  5. if host.system_info.distribution.lower() in debian_os:
  6. f = host.file('/etc/apt/sources.list.d/powerdns-auth-41.list')
  7. if host.system_info.distribution.lower() in rhel_os:
  8. f = host.file('/etc/yum.repos.d/powerdns-auth-41.repo')
  9. assert f.exists
  10. assert f.user == 'root'
  11. assert f.group == 'root'
  12. def test_pdns_repo(host):
  13. f = None
  14. if host.system_info.distribution.lower() in debian_os:
  15. f = host.file('/etc/apt/sources.list.d/powerdns-auth-41.list')
  16. if host.system_info.distribution.lower() in rhel_os:
  17. f = host.file('/etc/yum.repos.d/powerdns-auth-41.repo')
  18. assert f.exists
  19. assert f.contains('auth-41')
  20. def test_pdns_version(host):
  21. cmd = host.run('/usr/sbin/pdns_server --version')
  22. assert 'PowerDNS Authoritative Server 4.1.' in cmd.stderr