From a36ee527c8b162f231c9a61cfde11eb743b5d1a0 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Tue, 9 Aug 2022 14:47:42 +1000 Subject: [PATCH] system-config-run-borg-backup: add jammy test host With Jammy production nodes coming, add testing to the backup roles on this distro. Change-Id: I7d7733c7a52918b1faa65c3d0dcfd2cf94e66066 --- playbooks/zuul/templates/gate-groups.yaml.j2 | 2 ++ testinfra/test_borg_backups.py | 7 +++++-- zuul.d/system-config-run.yaml | 6 +++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/playbooks/zuul/templates/gate-groups.yaml.j2 b/playbooks/zuul/templates/gate-groups.yaml.j2 index 2e00ecdc5b..e13acba3ff 100644 --- a/playbooks/zuul/templates/gate-groups.yaml.j2 +++ b/playbooks/zuul/templates/gate-groups.yaml.j2 @@ -20,6 +20,7 @@ groups: backup: - backup-test01.opendev.org - backup-test02.opendev.org + - backup-test03.opendev.org borg-backup-server: - borg-backup01.region.provider.opendev.org @@ -27,6 +28,7 @@ groups: borg-backup: - borg-backup-test01.opendev.org - borg-backup-test02.opendev.org + - borg-backup-test03.opendev.org kerberos-kdc: - kdc-primary.opendev.org diff --git a/testinfra/test_borg_backups.py b/testinfra/test_borg_backups.py index 6839c7b6d5..4ae6aa1507 100644 --- a/testinfra/test_borg_backups.py +++ b/testinfra/test_borg_backups.py @@ -17,7 +17,8 @@ import pytest testinfra_hosts = ['borg-backup01.region.provider.opendev.org', 'borg-backup-test01.opendev.org', - 'borg-backup-test02.opendev.org'] + 'borg-backup-test02.opendev.org', + 'borg-backup-test03.opendev.org'] def test_borg_installed(host): @@ -35,7 +36,9 @@ def test_borg_server_users(host): if hostname.startswith('borg-backup-test'): pytest.skip() - for username in 'borg-borg-backup-test01', 'borg-borg-backup-test02': + for username in ('borg-borg-backup-test01', + 'borg-borg-backup-test02', + 'borg-borg-backup-test03'): homedir = os.path.join('/opt/backups/', username) borg_repo = os.path.join(homedir, 'backup') authorized_keys = os.path.join(homedir, '.ssh', 'authorized_keys') diff --git a/zuul.d/system-config-run.yaml b/zuul.d/system-config-run.yaml index 18d937078c..6395ff0b7f 100644 --- a/zuul.d/system-config-run.yaml +++ b/zuul.d/system-config-run.yaml @@ -382,6 +382,8 @@ label: ubuntu-focal - name: borg-backup-test02.opendev.org label: ubuntu-bionic + - name: borg-backup-test03.opendev.org + label: ubuntu-jammy vars: run_playbooks: - playbooks/service-borg-backup.yaml @@ -405,7 +407,9 @@ borg-backup-test02.opendev.org: host_copy_output: '/var/log/borg-backup-borg-backup01.region.provider.opendev.org.log': logs - + borg-backup-test03.opendev.org: + host_copy_output: + '/var/log/borg-backup-borg-backup01.region.provider.opendev.org.log': logs - job: name: system-config-run-mirror-base