OSTree now has a repo config option to set which repo finders (that is,
sources for refs) will be used, and API which exposes the default set
(which was either configured by the user or decided by libostree). So
this commit changes flatpak_installation_list_remotes_by_type() to
respect that configuration, since that's the only place flatpak passes a
set of OstreeRepoFinder instances to libostree.
See also https://github.com/ostreedev/ostree/pull/1758/Closes: #2264
Approved by: pwithnall
Neither flatpak_variant_builder_init_from_variant nor
flatpak_gvariant_new_empty_string_dict are used anywhere.
Closes: #2252
Approved by: matthiasclasen
We now avoid sleeps in the test, instead use the proper
ways to deal with races: poll for the child pid after
launching the app, and use a child watch after killing
it.
This is using the new flatpak_installation_launch_full API.
Closes: #2221
Approved by: matthiasclasen
Avoid the 3-second 'afterlife' of instances by using
kill (pid, 0) instead of checking the file lock. We
trade pid for lock races, but this seems more reliable.
Also add flatpak_installation_launch_full that returns
a FlatpakInstance for the launched app, and lets us
avoid races around killing the app, by using a child
watch.
Closes: #2221
Approved by: matthiasclasen
This adds the logic from test_install_launch_uninstall() to
test_instance() and test_overrides() so that all three are skipped in CI
environments where bwrap may not be working. This is necessary because
they all use flatpak_installation_launch().
Currently `make distcheck` fails with:
PATH=$(cd . && pwd):${PATH} tests/make-test-runtime.sh
tests/runtime-repo org.test.Platform ""
/bin/bash: tests/make-test-runtime.sh: No such file or directory
This was caused by commit b5d86fe90 and is fixed by this commit.
If some installation is empty (or otherwise broken) we fail the
entire run command, even though the app might exist in e.g. the
user installation. This is a regression from
651c86d3c6 which also ended up in 1.0.4.
I had a report of (and old version of) flatpak stopping
an entire "flatpak update" because one app had a new required
version. This adds a test of this (and it seems fixed now).
The tests added here include checks for expected types in
the library (including enum types that are needed for
introspection), and for error handling around names.
Closes: #2245
Approved by: alexlarsson
If we use a remote name containing questionable characters
such as newlines or '[', we will run into assertions in
GKeyFile. To avoid that, check that the group name we
pass is valid, and throw an error otherwise.
Found while writing tests.
Closes: #2244
Approved by: alexlarsson
The test for --columns was failing in ci because flatpak
gets built without libsystemd there. Avoid this by always
handling --columns=help nicely, even if libsystemd is not
used.
Closes: #2244
Approved by: alexlarsson
When trying to uninstall a non-installed app, we run
into an assertion, because the code forgets to return
after setting the expected error.
Found while writing tests.
Closes: #2244
Approved by: alexlarsson
In this case, the columns helper function returns an
empty array of columns. Exit cleanly without trying
to contact the documents service, in this case.
Found while writing tests.
Closes: #2244
Approved by: alexlarsson