Skip to content

Commit

Permalink
Remove EOL and added tests accordingly
Browse files Browse the repository at this point in the history
  • Loading branch information
npmdnl committed Jan 23, 2023
1 parent 5b7f434 commit 5e2bc0d
Show file tree
Hide file tree
Showing 12 changed files with 65 additions and 259 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ jobs:
- '2.10'
- '2.11'
scenario:
- pdns-43
- pdns-44
- pdns-45
- pdns-46
- pdns-47
Expand Down
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,23 @@ By default, the PowerDNS Authoritative Server is installed from the software rep
- { role: PowerDNS.pdns,
pdns_install_repo: "{{ pdns_auth_powerdns_repo_master }}"

# Install the PowerDNS Authoritative Server from the '4.3.x' official repository
# Install the PowerDNS Authoritative Server from the '4.5.x' official repository
- hosts: all
roles:
- { role: PowerDNS.pdns,
pdns_install_repo: "{{ pdns_auth_powerdns_repo_43 }}"
pdns_install_repo: "{{ pdns_auth_powerdns_repo_45 }}"

# Install the PowerDNS Authoritative Server from the '4.4.x' official repository
# Install the PowerDNS Authoritative Server from the '4.6.x' official repository
- hosts: all
roles:
- { role: PowerDNS.pdns,
pdns_install_repo: "{{ pdns_auth_powerdns_repo_44 }}"
pdns_install_repo: "{{ pdns_auth_powerdns_repo_46 }}"

# Install the PowerDNS Authoritative Server from the '4.7.x' official repository
- hosts: all
roles:
- { role: PowerDNS.pdns,
pdns_install_repo: "{{ pdns_auth_powerdns_repo_47 }}"
```
The examples above, show how to install the PowerDNS Authoritative Server from the official PowerDNS repositories
Expand Down
9 changes: 0 additions & 9 deletions molecule/pdns-43/converge.yml

This file was deleted.

88 changes: 0 additions & 88 deletions molecule/pdns-43/molecule.yml

This file was deleted.

9 changes: 0 additions & 9 deletions molecule/pdns-44/converge.yml

This file was deleted.

104 changes: 0 additions & 104 deletions molecule/pdns-44/molecule.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
def test_repo_file(host):
f = None
if host.system_info.distribution.lower() in debian_os:
f = host.file('/etc/apt/sources.list.d/powerdns-auth-43.list')
f = host.file('/etc/apt/sources.list.d/powerdns-auth-45.list')
if host.system_info.distribution.lower() in rhel_os:
f = host.file('/etc/yum.repos.d/powerdns-auth-43.repo')
f = host.file('/etc/yum.repos.d/powerdns-auth-45.repo')

assert f.exists
assert f.user == 'root'
Expand All @@ -18,12 +18,12 @@ def test_repo_file(host):
def test_pdns_repo(host):
f = None
if host.system_info.distribution.lower() in debian_os:
f = host.file('/etc/apt/sources.list.d/powerdns-auth-43.list')
f = host.file('/etc/apt/sources.list.d/powerdns-auth-45.list')
if host.system_info.distribution.lower() in rhel_os:
f = host.file('/etc/yum.repos.d/powerdns-auth-43.repo')
f = host.file('/etc/yum.repos.d/powerdns-auth-45.repo')

assert f.exists
assert f.contains('auth-43')
assert f.contains('auth-45')


def test_repo_pinning_file(host):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
def test_repo_file(host):
f = None
if host.system_info.distribution.lower() in debian_os:
f = host.file('/etc/apt/sources.list.d/powerdns-auth-44.list')
f = host.file('/etc/apt/sources.list.d/powerdns-auth-46.list')
if host.system_info.distribution.lower() in rhel_os:
f = host.file('/etc/yum.repos.d/powerdns-auth-44.repo')
f = host.file('/etc/yum.repos.d/powerdns-auth-46.repo')

assert f.exists
assert f.user == 'root'
Expand All @@ -18,12 +18,12 @@ def test_repo_file(host):
def test_pdns_repo(host):
f = None
if host.system_info.distribution.lower() in debian_os:
f = host.file('/etc/apt/sources.list.d/powerdns-auth-44.list')
f = host.file('/etc/apt/sources.list.d/powerdns-auth-46.list')
if host.system_info.distribution.lower() in rhel_os:
f = host.file('/etc/yum.repos.d/powerdns-auth-44.repo')
f = host.file('/etc/yum.repos.d/powerdns-auth-46.repo')

assert f.exists
assert f.contains('auth-44')
assert f.contains('auth-46')


def test_repo_pinning_file(host):
Expand All @@ -41,4 +41,4 @@ def test_pdns_version(host):
cmd = host.run('/usr/sbin/pdns_server --version')

assert 'PowerDNS Authoritative Server' in cmd.stderr
assert '4.4' in cmd.stderr
assert '4.3' in cmd.stderr
44 changes: 44 additions & 0 deletions molecule/resources/tests/repo-47/test_repo_47.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@

debian_os = ['debian', 'ubuntu']
rhel_os = ['redhat', 'centos', 'ol']


def test_repo_file(host):
f = None
if host.system_info.distribution.lower() in debian_os:
f = host.file('/etc/apt/sources.list.d/powerdns-auth-47.list')
if host.system_info.distribution.lower() in rhel_os:
f = host.file('/etc/yum.repos.d/powerdns-auth-47.repo')

assert f.exists
assert f.user == 'root'
assert f.group == 'root'


def test_pdns_repo(host):
f = None
if host.system_info.distribution.lower() in debian_os:
f = host.file('/etc/apt/sources.list.d/powerdns-auth-47.list')
if host.system_info.distribution.lower() in rhel_os:
f = host.file('/etc/yum.repos.d/powerdns-auth-47.repo')

assert f.exists
assert f.contains('auth-47')


def test_repo_pinning_file(host):
if host.system_info.distribution.lower() in debian_os:
f = host.file('/etc/apt/preferences.d/pdns')
assert f.exists
assert f.user == 'root'
assert f.group == 'root'
f.contains('Package: pdns-*')
f.contains('Pin: origin repo.powerdns.com')
f.contains('Pin-Priority: 600')


def test_pdns_version(host):
cmd = host.run('/usr/sbin/pdns_server --version')

assert 'PowerDNS Authoritative Server' in cmd.stderr
assert '4.3' in cmd.stderr
7 changes: 0 additions & 7 deletions molecule/resources/vars/pdns-repo-43.yml

This file was deleted.

7 changes: 0 additions & 7 deletions molecule/resources/vars/pdns-repo-44.yml

This file was deleted.

18 changes: 0 additions & 18 deletions vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,6 @@ pdns_auth_powerdns_repo_master:
yum_debug_symbols_repo_baseurl: "http://repo.powerdns.com/centos/$basearch/$releasever/auth-master/debug"
name: "powerdns-auth-master"

pdns_auth_powerdns_repo_43:
apt_repo_origin: "repo.powerdns.com"
apt_repo: "deb [arch=amd64] http://repo.powerdns.com/{{ ansible_distribution | lower }} {{ ansible_distribution_release | lower }}-auth-43 main"
gpg_key: "http://repo.powerdns.com/FD380FBB-pub.asc"
gpg_key_id: "9FAAA5577E8FCF62093D036C1B0C6205FD380FBB"
yum_repo_baseurl: "http://repo.powerdns.com/centos/$basearch/$releasever/auth-43"
yum_debug_symbols_repo_baseurl: "http://repo.powerdns.com/centos/$basearch/$releasever/auth-43/debug"
name: "powerdns-auth-43"

pdns_auth_powerdns_repo_44:
apt_repo_origin: "repo.powerdns.com"
apt_repo: "deb [arch=amd64] http://repo.powerdns.com/{{ ansible_distribution | lower }} {{ ansible_distribution_release | lower }}-auth-44 main"
gpg_key: "http://repo.powerdns.com/FD380FBB-pub.asc"
gpg_key_id: "9FAAA5577E8FCF62093D036C1B0C6205FD380FBB"
yum_repo_baseurl: "http://repo.powerdns.com/centos/$basearch/$releasever/auth-44"
yum_debug_symbols_repo_baseurl: "http://repo.powerdns.com/centos/$basearch/$releasever/auth-44/debug"
name: "powerdns-auth-44"

pdns_auth_powerdns_repo_45:
apt_repo_origin: "repo.powerdns.com"
apt_repo: "deb [arch=amd64] http://repo.powerdns.com/{{ ansible_distribution | lower }} {{ ansible_distribution_release | lower }}-auth-45 main"
Expand Down

0 comments on commit 5e2bc0d

Please sign in to comment.