summaryrefslogtreecommitdiff
path: root/tests/test-basic.sh
Commit message (Collapse)AuthorAgeFilesLines
* Update FSF license notices to use URL instead of addressJoseph Marrero2021-12-071-3/+1
|
* lib/commit: Try checksum+hardlink for untrusted local same-uid reposColin Walters2018-12-041-1/+2
| | | | | | | | | | | | This mainly helps flatpak for enabling a hardlink-able local pull during deploy in the --system case. We assume the files are immutable when owned by the same uid. See https://github.com/ostreedev/ostree/issues/1723 and https://github.com/flatpak/flatpak/pull/2342 Closes: #1776 Approved by: uajain
* Add SPDX-License-Identifier to source filesMarcus Folkesson2018-01-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | SPDX License List is a list of (common) open source licenses that can be referred to by a “short identifier”. It has several advantages compared to the common "license header texts" usually found in source files. Some of the advantages: * It is precise; there is no ambiguity due to variations in license header text * It is language neutral * It is easy to machine process * It is concise * It is simple and can be used without much cost in interpreted environments like java Script, etc. * An SPDX license identifier is immutable. * It provides simple guidance for developers who want to make sure the license for their code is respected See http://spdx.org for further reading. Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Closes: #1439 Approved by: cgwalters
* tests,ci: Move "test-basic" (bare mode) to installed testColin Walters2017-09-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Our CI uses default Docker, which has SELinux labeling but is rather evil in returning `EOPNOTSUPP` to any attempts to set `security.selinux`, even if to the same value. The previous fire 🔥 for this was: https://github.com/ostreedev/ostree/pull/759 The `bare` repo mode really only makes sense as uid 0, so our installed test framework is a good match for this. However, the unit tests *do* work in a privileged container even as non-root, and *also* should work on SELinux-disabled systems. So let's teach the test framework how to skip in those situations. I tested this both in a priv container (my default builder) and an unpriv container (like our CI). At the same time, start executing the `test-basic.sh` from an installed test, so we get better coverage than before. This is just the start - all of the sysroot tests really need the same treatment. Closes: #1217 Approved by: jlebon
* tests: Port to glib-tap.mk, make `make check` run all of the testsColin Walters2016-03-031-3/+0
| | | | | | | | | | | | | | | | | | OSTree's code for testing predates the `glib-tap.mk` making its way into GLib. Let's switch to it, as it provides a number of advantages. By far the biggest advantage is that `make check` can start to run most of the tests *in addition* to having them work installed. This commit keeps the installed tests working, but `make check` turns out to be really broken because...our TAP usage has bitrotted to say the least. Fix that all up. Do some hacks so that the tests work uninstalled as well - in particular, `glib-tap.mk` and the bits encoded into `g_test_build_filename()` assume *recursive* Automake (blah). Work around that by creating a symlink when installed to loop back.
* tests: Use "bash strict mode"Colin Walters2016-01-271-1/+1
| | | | | | | | | | I noticed in the static deltas tests, there were some tests that should have been under `-o pipefail` to ensure we properly propagate errors. There were a few places where we were referencing undefined variables. Overall, this is clearly a good idea IMO.
* Split out basic tests from test-basic.shAlexander Larsson2014-12-081-340/+2
| | | | | | This will let us reuse them with other repo types https://bugzilla.gnome.org/show_bug.cgi?id=741125
* pull-local: Write detached metadata into the correct repositoryColin Walters2014-07-221-0/+2
| | | | | | | | We want to write to the dest repo, not src. Noticed while reviewing this code for some other bug. https://bugzilla.gnome.org/show_bug.cgi?id=733579
* repofile: Avoid segfault if querying child in non-directoryColin Walters2014-07-211-0/+7
| | | | | | | | | | | | The user might "ostree ls /usr/bin/bash/blah", which previously would segfault. A somewhat related future enhancement here would be for "ostree ls" to follow symbolic links. Reported-by: Dusty Mabe <dustymabe@gmail.com> https://bugzilla.gnome.org/show_bug.cgi?id=733476
* core: Do enumerate ff/ objects as wellColin Walters2014-07-211-0/+13
| | | | | | An embarassing off-by-one here. I noticed we weren't pruning them. https://bugzilla.gnome.org/show_bug.cgi?id=733458
* ostree-repo-resolve-rev: Add function to accept a partial checksumAnne LoVerso2014-07-181-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a function that will parse a partial checksum when resolving a refspec. If the inputted refspec matches a truncated existing checksum, it will return that checksum to be parsed. If multiple truncated checksums match the partial refspec, it is not unique and will return false. This addition is inspired by the same functionality in Docker, which allows a user to reference a specific commit without typing the entire checksum. partial checksums: Add function to abstract comparison This modifies the list_objects and list_objects_at functions to take an additional argument for the string that a commit starts with. If this string arg is not null, it will only list commit objects beginning with that string. This allows for a new function ostree_repo_list_commit_objects_starting_with to pass a partial string and return a list of all matching commits. This improves on the previous strategy of listing refs because it will list all commit objects, even ones in past history. This update also includes bugfixes on error handling and string comparison, and changes the output structure of resolve_partial_checksum. The new strcuture will no longer return FALSE without error. Also, the hashtable foreach now uses iter. Also includes modified test file
* tests: Add a test which exercises --fsync=falseColin Walters2014-06-181-0/+6
|
* commit: Reject non-regular/non-symlinks earlier with better error messageColin Walters2014-01-171-0/+11
| | | | | | | Also avoid _NOT_SUPPORTED as that triggers the --help behavior from the commandline; just use _FAILED. https://bugzilla.gnome.org/show_bug.cgi?id=722410
* core: Set mtime of content objects to 0Roddy Shuler2013-12-151-0/+7
| | | | | | | | This is necessary to satisfy tools such as guile and python, which compare mtimes to determine whether or not source files need to be compiled. https://bugzilla.gnome.org/show_bug.cgi?id=720363
* main/remote: Add a show-url operation to the remote commandDaniel Narvaez2013-10-281-0/+5
| | | | | | Useful to get the remote url in scripts. https://bugzilla.gnome.org/show_bug.cgi?id=710967
* remote-add: Add --set=KEY=VALUE optionColin Walters2013-09-281-0/+6
| | | | | This can be used to add a remote and set e.g. tls-permissive=true, or gpgverify=false.
* pull: Also fetch detached commitmeta filesColin Walters2013-09-261-0/+8
| | | | | These will contain GPG signatures and the like in the future, so we should fetch them now.
* core: Add detached metadata, readd metadata to commitsColin Walters2013-09-091-1/+10
| | | | | | | | | | | | | | | | Previously I thought we'd have to ditch the current commit format to avoid a{sv} due to See https://bugzilla.gnome.org/show_bug.cgi?id=673012 But I realized that we don't really have to care about unpacking/repacking commit objects, so let's just re-expose the existing metadata a{sv} in commits in the API. Also, add support for "detached" metadata that can be updated at any time post-commit. This is specifically designed for GPG signatures. https://bugzilla.gnome.org/show_bug.cgi?id=707379
* main: Support passing bare directory names to commitColin Walters2013-08-281-1/+8
| | | | | It segfaulted before if you passed non-options, and a single directory name is probably what people want.
* Add 'ostree reset' command to undo a bad commitStef Walter2013-08-161-1/+11
| | | | | | | | | Accepts the following arguments: ref checksum Checks that the checksum is a parent of the ref before rewriting the ref. https://bugzilla.gnome.org/show_bug.cgi?id=705979
* Add 'ostree log' commandStef Walter2013-08-151-1/+11
| | | | | | | Follows the parent of commits showing each in turn until it reaches the top of the commit tree. https://bugzilla.gnome.org/show_bug.cgi?id=705973
* Intelligible display for 'ostree show'Stef Walter2013-08-151-1/+8
| | | | | | | Show something similar to git metadata display. Show raw variant data when --raw is specified https://bugzilla.gnome.org/show_bug.cgi?id=705973
* Don't pass non-checksums to ostree_repo_has_object()Stef Walter2013-08-141-1/+4
| | | | | | | | The 'ostree show' command passed non-checksum arguments to the ostree_repo_has_object() function which led to an assertion. https://bugzilla.gnome.org/show_bug.cgi?id=705967
* main: Assume / for ls if no path givenColin Walters2013-07-271-1/+5
| | | | Since it just is kind of a sane default.
* main: Support using repo from current directoryColin Walters2013-07-241-1/+4
| | | | | | | | $ cd repo $ ostree ls foo / ... Can be a lot more convenient than typing --repo=repo a lot.
* Drop support for related objects and metadata in commit objectsColin Walters2013-07-241-22/+1
| | | | | | | | | | While the actual commit object format is presently the same, for a number of reasons we'd like to change it fairly radically. Among other things, we need to drop our a{sv} types in objects, to protect against GVariant changing format. Since now gnome-ostree now longer uses related objects, and nothing ever used metadata, just drop them both.
* tests: Add a test for link checkout speedupColin Walters2013-07-171-1/+6
|
* tests: Drop numeric prefixColin Walters2013-07-091-0/+256
Theoretically it's useful to have layers of tests, but in practice it's just annoying to assign numbers.