Skip to content

Commit f2aecfc

Browse files
committed
tests: Add bootc end-to-end validation test
Add a knob to tests/tasks/install_and_check.yml to skip the role run, as we don't want to do this during validation.
1 parent 586f31c commit f2aecfc

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

tests/tasks/install_and_check.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
include_role:
77
name: linux-system-roles.postgresql
88
public: true
9+
when: __run_role | d(true) | bool
910

1011
- name: Flush handlers
1112
meta: flush_handlers

tests/tests_bootc_e2e.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# SPDX-License-Identifier: MIT
2+
---
3+
- name: bootc end-to-end test
4+
hosts: all
5+
tags:
6+
- tests::bootc-e2e
7+
gather_facts: false
8+
tasks:
9+
- name: bootc image build preparation
10+
when: ansible_connection == "buildah"
11+
block:
12+
- name: Run postgresql role
13+
include_role:
14+
name: linux-system-roles.postgresql
15+
16+
- name: Create QEMU deployment
17+
delegate_to: localhost
18+
command: "{{ lsr_scriptdir }}/bootc-buildah-qcow.sh {{ ansible_host }}"
19+
20+
- name: Validation of deployed image
21+
when: ansible_connection | d("") != "buildah"
22+
block:
23+
- name: Test default settings
24+
include_tasks: tasks/install_and_check.yml
25+
vars:
26+
__run_role: false
27+
__test_clean_instance: false
28+
__postgresql_is_booted: true
29+
__test_check_version: true

0 commit comments

Comments
 (0)