diff --git a/tests.sh b/tests.sh index a4fef8c..a3c94b3 100755 --- a/tests.sh +++ b/tests.sh @@ -44,12 +44,19 @@ poetry run \ --format json | jq DEBIAN_FRONTEND=noninteractive apt-get remove -y --purge cowsay -# Common simple packages mode (is tested later) +# Ensure some flatpaks are installed +flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo +flatpak install -y flathub org.onionshare.OnionShare + poetry run \ enroll manifest \ --harvest "${BUNDLE_DIR}2" \ - --out "${ANSIBLE_DIR}2" \ - --merge-simple-packages + --out "${ANSIBLE_DIR}2" + +# Test the presence of OnionShare +builtin cd "${ANSIBLE_DIR}2" +grep -r org.onionshare.OnionShare "${ANSIBLE_DIR}2/roles" +ansible-playbook playbook.yml -i "localhost," -c local --check --diff --tags role_flatpak # Ansible test builtin cd "${ANSIBLE_DIR}" @@ -58,9 +65,3 @@ ansible-lint "${ANSIBLE_DIR}" # Run ansible-playbook playbook.yml -i "localhost," -c local --check --diff - -# Test the --merge-simple-packages mode -builtin cd "${ANSIBLE_DIR}2" -ls "${ANSIBLE_DIR}2/roles" - -ansible-playbook playbook.yml -i "localhost," -c local --check --diff