Skip to content

Commit

Permalink
Update forklift_versions role tests to use current versions
Browse files Browse the repository at this point in the history
  • Loading branch information
archanaserver committed Aug 30, 2024
1 parent b244460 commit 6762c81
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 85 deletions.
38 changes: 12 additions & 26 deletions roles/forklift_versions/molecule/default/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,22 @@
vars:
forklift_versions_file: "{{ playbook_dir }}/fixtures/versions.yaml"
pipeline_type: katello
pipeline_os: centos8-stream
pipeline_os: centos9-stream
tasks:
- name: "Include forklift_versions for 4.8 installs"
- name: "Include forklift_versions for 4.12 installs"
include_role:
name: "forklift_versions"
vars:
scenario: "{{ pipeline_type }}"
scenario_os: "{{ pipeline_os }}"
scenario_version: "4.8"
scenario_version: "4.12"
- name: Ensure versions have been set correctly
assert:
that:
- foreman_repositories_version == '3.6'
- katello_repositories_version == '4.8'
- pulpcore_repositories_version == '3.22'
- candlepin_repositories_version is not defined

- name: "Include forklift_versions for 4.4 installs"
include_role:
name: "forklift_versions"
vars:
scenario: "{{ pipeline_type }}"
scenario_os: "{{ pipeline_os }}"
scenario_version: "4.9"
- name: Ensure versions have been set correctly
assert:
that:
- foreman_repositories_version == '3.7'
- katello_repositories_version == '4.9'
- pulpcore_repositories_version == '3.22'
- foreman_repositories_version == '3.10'
- katello_repositories_version == '4.12'
- pulpcore_repositories_version == '3.39'
- candlepin_repositories_version == '4.3'

- name: "Include forklift_versions for nightly installs"
include_role:
Expand All @@ -59,21 +45,21 @@
vars:
scenario: "{{ pipeline_type }}"
scenario_os: "{{ pipeline_os }}"
scenario_version: "4.9"
scenario_version: "4.13"
upgrade: True
- name: Ensure upgrade steps have been determined correctly
assert:
that:
- forklift_upgrade_version_start == '4.7'
- forklift_upgrade_version_intermediate == '4.8'
- forklift_upgrade_version_final == '4.9'
- forklift_upgrade_version_start == '4.12'
- forklift_upgrade_version_intermediate == '4.12'
- forklift_upgrade_version_final == '4.13'

- name: "Include forklift_versions for upgrades with upgrade_step=2"
include_role:
name: "forklift_versions"
vars:
scenario: "{{ pipeline_type }}"
scenario_os: "{{ pipeline_os }}"
scenario_os: "almalinux8"
scenario_version: "4.9"
upgrade: True
upgrade_step: 2
Expand Down
39 changes: 0 additions & 39 deletions vagrant/boxes.d/00-centos.yaml
Original file line number Diff line number Diff line change
@@ -1,43 +1,4 @@
boxes:
centos7:
box_name: 'centos/7'
google_options:
image_family: 'centos-7'
pty: true
scenarios:
- foreman
- katello

centos7-atomic:
box_name: centos7-atomic
pty: true
libvirt: http://cloud.centos.org/centos/7/atomic/images/CentOS-Atomic-Host-7-Vagrant-Libvirt.box

centos7-fips:
box_name: 'pulp/centos7-fips'
pty: true
scenarios:
- foreman
- katello

centos8:
box_name: 'centos/8'
disk_size: 40
pty: true
scenarios:
- foreman
- katello

centos8-stream:
box_name: 'centos/stream8'
disk_size: 40
libvirt: https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-Vagrant-8-latest.x86_64.vagrant-libvirt.box
virtualbox: https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-Vagrant-8-latest.x86_64.vagrant-virtualbox.box
pty: true
scenarios:
- foreman
- katello

centos9-stream:
box_name: 'centos/stream9'
disk_size: 40
Expand Down
14 changes: 7 additions & 7 deletions vagrant/boxes.d/01-builtin.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
boxes:
centos7-freeipa-server:
box: centos7
centos9-freeipa-server:
box: centos9-stream
memory: 2048
ansible:
playbook: 'playbooks/freeipa_server.yml'
group: 'freeipa_server'
server: 'centos7-katello-nightly'
server: 'centos9-stream-katello-nightly'

centos7-provision-nightly:
box: centos7
centos9-provision-nightly:
box: centos9-stream
memory: 8096
cpu_mode: host-passthrough
ansible:
Expand All @@ -17,7 +17,7 @@ boxes:
- 'playbooks/katello_provisioning.yml'
group: 'server'

centos7-luna:
box: centos7
centos9-luna:
box: centos9-stream
ansible:
playbook: 'playbooks/luna.yml'
4 changes: 2 additions & 2 deletions vagrant/boxes.d/02-kubevirt.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
centos7-infra-kubevirt:
box: centos7
centos9-infra-kubevirt:
box: centos9-stream
cpu_mode: host-passthrough
ansible:
playbook: 'playbooks/kubevirt.yml'
Expand Down
4 changes: 2 additions & 2 deletions vagrant/boxes.d/99-local.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ almalinux8-proxy-devel:
group: 'foreman-proxy-content'
server: 'almalinux8-katello-devel'

centos7-katello-client:
box: centos7
centos9-katello-client:
box: centos9-stream
ansible:
playbook: 'playbooks/katello_client.yml'
group: 'client'
Expand Down
6 changes: 0 additions & 6 deletions vagrant/config/versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,12 @@ installers:
- 'centos8-stream'
- 'debian11'
- 'ubuntu2004'

- foreman: '3.8'
katello: '4.10'
pulpcore: '3.28'
puppet: 7
boxes:
- 'almalinux8'
- 'centos8-stream'
- 'debian11'
- 'ubuntu2004'

Expand All @@ -70,7 +68,6 @@ installers:
puppet: 7
boxes:
- 'almalinux8'
- 'centos8-stream'
- 'debian11'
- 'ubuntu2004'

Expand All @@ -82,7 +79,6 @@ installers:
boxes:
- 'almalinux8'
- 'almalinux9'
- 'centos8-stream'
- 'centos9-stream'
- 'debian11'
- 'ubuntu2004'
Expand All @@ -95,7 +91,6 @@ installers:
boxes:
- 'almalinux8'
- 'almalinux9'
- 'centos8-stream'
- 'centos9-stream'
- 'debian11'
- 'ubuntu2004'
Expand All @@ -122,7 +117,6 @@ installers:
boxes:
- 'almalinux8'
- 'almalinux9'
- 'centos8-stream'
- 'centos9-stream'
- 'debian11'
- 'ubuntu2004'
Expand Down
6 changes: 3 additions & 3 deletions vagrant/test/lib/box_loader_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ def test_load
loader.load!

assert_instance_of Hash, loader.boxes
assert_includes loader.boxes, 'centos8-stream-katello-nightly'
assert_equal 'centos8-stream-katello-nightly', loader.boxes['centos8-stream-katello-nightly']['name']
assert_equal 'centos/stream8', loader.boxes['centos8-stream-katello-nightly']['box_name']
assert_includes loader.boxes, 'centos9-stream-katello-nightly'
assert_equal 'centos9-stream-katello-nightly', loader.boxes['centos9-stream-katello-nightly']['name']
assert_equal 'centos/stream9', loader.boxes['centos9-stream-katello-nightly']['box_name']
end

def test_load_with_exclude
Expand Down

0 comments on commit 6762c81

Please sign in to comment.