mirror of
https://github.com/JasonN3/build-container-installer.git
synced 2025-12-25 19:07:54 +01:00
add flatpak test
This commit is contained in:
parent
d14ca6c503
commit
1b0319ae83
4 changed files with 52 additions and 20 deletions
22
tests/vm/flatpaks.yml
Normal file
22
tests/vm/flatpaks.yml
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env ansible-playbook -i ansible_inventory
|
||||
---
|
||||
- name: Test for flatpaks
|
||||
hosts: vm
|
||||
gather_facts: no
|
||||
|
||||
tasks:
|
||||
- name: Get gpg key
|
||||
ansible.builtin.set-fact:
|
||||
found_gpg: "{{ slurpfile['/ostree/deploy/default/var/lib/flatpak/repo'] | base64 }}"
|
||||
expected_gpg: "{{ lookup('ansible.builtin.url', 'https://flathub.org/repo/flathub.flatpakrepo', split_lines=True) | regex_search('^GPGKey=(.*)$', '\\1' multiline=True, ignorecase=True) }}"
|
||||
|
||||
- name: Test GPG key
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- found_gpg == found_gpg
|
||||
fail_msg: "Installed GPG key does not match GPG key in flatpakrepo file"
|
||||
success_msg: "GPG key matches"
|
||||
|
||||
- name: Test updating flatpak packages
|
||||
ansible.builtin.command:
|
||||
cmd: /usr/bin/flatpak update -y
|
||||
Loading…
Add table
Add a link
Reference in a new issue