Skip to content

Commit

Permalink
Add F41 tests (#145)
Browse files Browse the repository at this point in the history
Co-authored-by: Noel Miller <[email protected]>
  • Loading branch information
JasonN3 and noelmiller authored Oct 30, 2024
1 parent f9395d5 commit a1ce6da
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 31 deletions.
37 changes: 8 additions & 29 deletions .github/workflows/build_vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,40 +10,19 @@ on:
{
"version": [
"39",
"40",
],
"40",
"41"
],
"flatpaks": [
"false",
"flatpak_dir",
"flatpak_refs_dir",
"flatpak_refs"
],
"exclude": [
{
"version": "40",
"flatpaks": "flatpak_dir"
},
{
"version": "40",
"flatpaks": "flatpak_refs"
}
"image_repo": [
"ghcr.io/ublue-os"
],
"include": [
{
"version": "39",
"image_repo": "quay.io/fedora-ostree-desktops",
"image_name": "base"
},
{
"version": "40",
"image_repo": "quay.io/fedora",
"image_name": "fedora-bootc"
},
{
"version": "38",
"image_repo": "quay.io/fedora",
"image_name": "fedora-bootc",
"image_src": "docker://quay.io/fedora-ostree-desktops/base:39"
}
"image_name": [
"base-main"
]
}'
VARIANT:
Expand Down
1 change: 1 addition & 0 deletions flatpaks/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ repo: script.sh

script.sh:
cat << EOF > script.sh
which flatpak &> /dev/null || dnf install -y flatpak
mkdir -p /flatpak/flatpak /flatpak/triggers
mkdir /var/tmp || true
chmod -R 1777 /var/tmp
Expand Down
2 changes: 1 addition & 1 deletion lorax_templates/flatpak_set_repo.tmpl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<%page args="flatpak_remote_name, _flatpak_repo_url, version"/>
% if int(version) >= 41:
append etc/anaconda/conf.d/anaconda.conf "[Payload]"
append etc/anaconda/conf.d/anaconda.conf "flatpak_remote = ${flatpak_remote_name} ${_flatpak_repo_url}"
% else:
replace "flatpak_manager\.add_remote\(\".*\", \".*\"\)" "flatpak_manager.add_remote(\"${flatpak_remote_name}\", \"${_flatpak_repo_url}\")" /usr/lib64/python*/site-packages/pyanaconda/modules/payloads/payload/rpm_ostree/flatpak_installation.py
replace "flatpak_manager\.replace_installed_refs_remote\(\".*\"\)" "flatpak_manager.replace_installed_refs_remote(\"${flatpak_remote_name}\")" /usr/lib64/python*/site-packages/pyanaconda/modules/payloads/payload/rpm_ostree/flatpak_installation.py
% endif

14 changes: 14 additions & 0 deletions test/iso/flatpak_repo_updated.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
#!/bin/bash

if [[ ${VERSION} -ge 41 ]]
then
result=0
grep "^\[Payload\]" mnt/install/etc/anaconda/conf.d/anaconda.conf > /dev/null || {
echo "Missing [Payload] header"
result=1
}
grep "^flatpak_remote = ${FLATPAK_REMOTE_NAME} ${_FLATPAK_REPO_URL}" mnt/install/etc/anaconda/conf.d/anaconda.conf > /dev/null || {
echo "Missing flatpak_remote option"
result=1
}
exit ${result}
fi

add_line=$(grep flatpak_manager.add_remote mnt/install/usr/lib64/python*/site-packages/pyanaconda/modules/payloads/payload/rpm_ostree/flatpak_installation.py)

add_line_repo=$(echo "${add_line}" | grep "${FLATPAK_REMOTE_NAME}")
Expand Down
4 changes: 3 additions & 1 deletion test/vm/flatpak_fedora_repo_disabled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
register: services_state

- name: Check that flatpak-add-fedora-repos is disabled
when: services_state['ansible_facts']['services']['flatpak-add-fedora-repos.service'] is defined
ansible.builtin.assert:
that:
- services_state['ansible_facts']['services']['flatpak-add-fedora-repos.service']['status'] == 'disabled'
fail_msg: 'flatpak-add-fedora-repos.service is not disabled'
fail_msg: 'flatpak-add-fedora-repos.service is not disabled'
success_msg: 'flatpak-add-fedora-repos.service is correctly disabled'

0 comments on commit a1ce6da

Please sign in to comment.