From 46412ee5adcb82297bd2d64f384852f7a48d32d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Ravier?= Date: Wed, 23 Feb 2022 11:20:56 +0100 Subject: [PATCH] Replace unused gating tests by an initial one rpm-ostree is tested in upstream and downstream CI. This replaces existing but not-enabled tests by an initial basic functionnal test. Resolves: rhbz#2059665 --- gating.yaml | 6 ++++ tests/tests.yml | 90 +++++-------------------------------------------- 2 files changed, 14 insertions(+), 82 deletions(-) create mode 100644 gating.yaml diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..b32a76a --- /dev/null +++ b/gating.yaml @@ -0,0 +1,6 @@ +--- !Policy +product_versions: + - rhel-9 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} # this is the testcase identifier, which OSCI pipeline uses diff --git a/tests/tests.yml b/tests/tests.yml index 8ab6238..f865402 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -1,83 +1,9 @@ ---- - hosts: localhost - gather_facts: yes - vars: - artifacts: "{{ lookup('env', 'TEST_ARTIFACTS')|default('./artifacts', true) }}" - subjects: "{{ lookup('env', 'TEST_SUBJECTS')}}" - tags: - - atomic - - tasks: - - name: Prepare an SSH config - set_fact: - ssh_config: | - Host vmcheck - User {{ansible_ssh_user}} - Port {{ansible_ssh_port}} - HostName {{ansible_ssh_host}} - IdentityFile {{ansible_ssh_private_key_file}} - UserKnownHostsFile /dev/null - StrictHostKeyChecking no - - - name: Add executor host - add_host: - name: executor - ansible_connection: local - ansible_ssh_host: 127.0.0.1 - ansible_ssh_connection: local - - # XXX: move to standard-test-roles, e.g. standard-test-get-source - - name: Extract and run tests - delegate_to: executor - block: - - name: Gather facts - setup: - delegate_facts: True - - - name: Install requirements - package: name={{item}} state=present - with_items: - - fedpkg - - # The dist doesn't actually matter here, it's just so we don't barf on - # private branches. - - name: Download and extract sources - command: fedpkg --dist=master prep - args: - chdir: "{{playbook_dir}}/.." - - - name: Get source directory from environment - shell: rpm -q --specfile {{playbook_dir}}/../rpm-ostree.spec - --qf '{{playbook_dir}}/../%{NAME}-%{VERSION}\n' | head -n1 - register: srcdir_query - - - set_fact: - srcdir: "{{srcdir_query.stdout}}" - - - name: Write out SSH config - copy: - content: "{{ssh_config}}" - dest: "{{srcdir}}/ssh-config" - - - set_fact: - vmssh: ssh -F {{srcdir}}/ssh-config vmcheck - - - name: Get rpm-ostree status - command: "{{vmssh}} rpm-ostree status --json" - - - name: Run vmcheck - block: - - name: Start test - command: tests/vmcheck/multitest.py vmcheck - # XXX: consider making vmcheck become an installed test - environment: - VMTESTS: 1 - TESTS: basic - topsrcdir: "{{srcdir}}" - commondir: "{{srcdir}}/tests/common" - args: - chdir: "{{srcdir}}" - - always: - - name: Fetch test results - command: rsync -a --delete {{srcdir}}/vmcheck/ {{artifacts}}/vmcheck + roles: + - role: standard-test-basic + tags: + - classic + tests: + - simple: + dir: . + run: "rpm-ostree --help"