summaryrefslogtreecommitdiff
path: root/tests/make-test-app.sh
Commit message (Collapse)AuthorAgeFilesLines
* Ensure special characters in permissions and metadata are escapedRyan Gonzalez2023-03-161-0/+8
| | | | | | | | | This prevents someone from placing special characters in order to manipulate the appearance of the permissions list. CVE-2023-28101, GHSA-h43h-fwqx-mpp8 Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
* tests: Avoid printing arbitrary text to stdoutSimon McVittie2022-05-031-7/+7
| | | | | | | | Meson's TAP parser won't accept this, unlike Automake's. At the moment libtest.sh directs stderr to stdout anyway, so there is no practical effect for this change, but a subsequent commit will remove that merging. Signed-off-by: Simon McVittie <smcv@collabora.com>
* Export to share/metainfo not share/appdataPhaedrus Leeds2022-01-101-3/+21
| | | | | | | | | Read metainfo files from both share/appdata and share/metainfo to support new and old versions of flatpak-builder (https://github.com/flatpak/flatpak-builder/pull/441) but only export to the new path. Fixes https://github.com/flatpak/flatpak/issues/4599
* tests: Test appdata installationGuido Günther2021-11-151-3/+5
| | | | Signed-off-by: Guido Günther <agx@sigxcpu.org>
* common: Add API for listing related refs of installed refPhaedrus Leeds2021-02-101-0/+45
| | | | | | | | | | | | | | | | | | | | | Currently if a user of libflatpak wants to list the related refs (such as extensions and plugins) of something, they have three options: 1. They can parse the metadata manually with e.g. flatpak_remote_ref_get_metadata() and then key-file operations, but this means re-implementing parts of libflatpak and using key file strings that are not actually public (FLATPAK_METADATA_KEY_...). 2. They can use flatpak_installation_list_installed_related_refs_sync() but this only works for installed related refs not remote ones. 3. They can use flatpak_installation_list_remote_related_refs_sync() but this lists all remotely available related refs, including ones that may not be compatible with the installed version of the main ref (because they don't match any of the values in the "versions" metadata key). So since none of these provide a way to get the remote related refs corresponding to an installed application, add new API for that. For the motivation of this see https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1132
* tests: Avoid unnecessarily recreating the summary fileAlexander Larsson2020-11-171-4/+2
| | | | | | | | | | | We enforce --no-update-summary when we create test apps and runtimes, and then we ensure we always manually call update_repo after all modifications are done. This means we save work avoiding summary updates, but it also means we can do special handling in update_summary and guarantee that this is the only place this happens. For example, we want this to work around the mtime handling of summary updates.
* tests: Allow specifying app id and app branch for updated appsAlexander Larsson2020-06-221-2/+4
|
* tests: test search-provider DefaultDisabled logicWill Thompson2019-11-291-0/+9
| | | | | | 2ebf67286660f5111baac379fd44a401f57b40bb introduced special handling to mark exported GNOME Shell search provider .ini files as disabled by default. This functionality was not previously tested.
* update-portal: Add tests with changed permission errorsAlexander Larsson2019-10-021-1/+1
|
* Make test output a bit less noicyAlexander Larsson2019-10-021-0/+3
| | | | | This gets rid of some unnecessary spew that happens in every test run and just makes the logs harder to read.
* tests: Add test for required-flatpak versioningAlexander Larsson2019-09-181-0/+8
| | | | | | | | | | | | This sets required-flatpak in the metadata to some different versions and ensure we're properly able or not able to install it. Additionally it uses some options with multiple versions. This is not yet supported but I want to test the existing code and make sure it properly falls back to just using the first element of the list. Closes: #3112 Approved by: alexlarsson
* tests: Consistently use a bash shebangMatthew Leeds2019-05-091-1/+1
| | | | | | | | There's not much point in using /bin/bash for all but three scripts and using /bin/sh for those, so use bash for everything. Closes: #2705 Approved by: alexlarsson
* tests: Test preserving previous-ids and X-Flatpak-RenamedFromWill Thompson2019-04-121-0/+10
| | | | | | | | | | This copy-pastes a lot of internal code from flatpak-dir.c to mess with the deploy file. It could be made a lot shorter... https://phabricator.endlessm.com/T23845 Closes: #2775 Approved by: alexlarsson
* tests: Fix test-app Locale dependencyAlexander Larsson2019-04-121-1/+1
| | | | | | | | We were always looking for org.test.Hello.Locale even when the app id was something else Closes: #2775 Approved by: alexlarsson
* tests: Add ability to test a branch other than masterMatthew Leeds2019-03-301-5/+7
| | | | | | | | | | This commit makes it so that a unit test can create the test app and runtime using a branch other than master, and changes test-run.sh to use the branch "stable". This will allow the run command to be tested better in the following commit. Closes: #2788 Approved by: matthiasclasen
* make-test-*: Don't sandbox the icon validatorSimon McVittie2019-01-311-1/+1
| | | | | | | | | | | | | | | | During build-time tests, bwrap doesn't necessarily work. In particular, official Debian autobuilders can't enter namespaces. We continue to leave the sandbox enabled in the build-export calls in tests/test-extensions.sh, tests/test-unsigned-summaries.sh and tests/test-update-remote-configuration.sh, which are already skipped if bwrap isn't available. This means we exercise both the normal and --disable-sandbox code paths. Signed-off-by: Simon McVittie <smcv@debian.org> Closes: #2661 Approved by: alexlarsson
* tests: Add appstream version to test appMatthias Clasen2019-01-111-0/+3
| | | | | Closes: #2498 Approved by: matthiasclasen
* Add a second language to the test appMatthias Clasen2018-10-101-1/+9
| | | | This will let us test subpaths better.
* Make the test app not hangMatthias Clasen2018-10-101-1/+1
| | | | | | We want an app that keeps running for some of the library tests, but other tests expect it to return right away. Make this opt-in.
* Modify the instance testMatthias Clasen2018-10-101-0/+3
| | | | | | | | Avoid the initial sleep statement, and instead poll for the child pid. We also need the test app to stick around and not exit right away, so change it to exec a shell.
* fixup! tests: Generate a .Locale extensionMatthias Clasen2018-10-101-4/+6
|
* tests: Generate a .Locale extensionMatthias Clasen2018-10-101-0/+34
| | | | | | Give the test app a Locale extension, so we can test things around related refs and subpaths. Fix up the library tests to work with a related ref in the repo.
* tests: Make make-test-{app,runtime}.sh take repo, not repo nameAlexander Larsson2018-10-051-2/+2
| | | | | | | | Later we want to use these outside the test suite, and then we might not use the same repo naming. Closes: #2188 Approved by: alexlarsson
* tests: Make the app ID in make-test-app.sh a parameterJoaquim Rocha2018-04-191-8/+14
| | | | | | | | | | | | This is in order to allow tests to make several apps if needed, and will be useful when e.g. testing repos that have multiple apps with different collection IDs. This patch modifies the mentioned script as mentioned and updates the places that call it. Closes: #1587 Approved by: mwleeds
* Add tests for end-of-lineAlexander Larsson2018-04-121-1/+1
| | | | | Closes: #1566 Approved by: alexlarsson
* tests: Add support for collection IDs to test-repo.shPhilip Withnall2017-08-181-1/+9
| | | | | | | | | | | | | | | This adds variable support for collection IDs: they can either be enabled on the server, on the server and client, or not at all. If enabled on the server, apps and runtimes are built with collection IDs and the repository has one set. If enabled on the client, the remote config is added to the local repository with a collection ID and GPG verification enabled. They are controlled with USE_COLLECTIONS_IN_{SERVER,CLIENT}={yes,no}. These variables are used in the new wrapper tests, test-repo-collections.sh and test-repo-collections-server-only.sh. Signed-off-by: Philip Withnall <withnall@endlessm.com>
* tests: Make it possible to create multiple test reposAlexander Larsson2017-05-101-1/+4
|
* tests: Remove some leftover debug spewAlexander Larsson2017-01-301-5/+1
|
* Fix tests now that build-init requires the runtime to be installedAlexander Larsson2017-01-271-2/+13
|
* tests: Move the test repo to a subdirectory (repos/test)Alexander Larsson2017-01-121-1/+2
| | | | | | | | | | | This makes the ostree trivial-httpd --autoexit feature work better, because it seems to exit whenever the root directory changes (i.e. not only when its deleted). This means the root dir can't be the repo (because then we can't update the repo), or the base testdir (because we create files there too), so instead we make the repo $testdir/repos/test and $testdir/repos as the httpd root.
* build-finish: Support exporting more than hicolor iconsAlexander Larsson2016-10-181-0/+3
| | | | We really want apps to be able to export e.g. HighContrast icons too.
* Fix test failures due to desktop validationAlexander Larsson2016-07-301-1/+2
|
* tests: Use gpg signatures during testAlexander Larsson2016-05-171-1/+1
|
* tests: Add test for updateAlexander Larsson2016-05-171-1/+3
|
* Rename everything but the on-disk location to flatpakAlexander Larsson2016-05-091-5/+5
|
* tests/test-run.sh: Add tests for proper installationAlexander Larsson2016-05-021-0/+14
|
* tests: Add a basic test that just runs an appAlexander Larsson2016-04-271-1/+1
|
* Add appdata to test appsAlexander Larsson2016-02-251-0/+19
|
* Add test scripts that create trivial a runtime and appAlexander Larsson2016-02-251-0/+19