Commit Graph

60 Commits

Author SHA1 Message Date
Colin Walters
2c526046d8 test-basic: Always chown back before doing assertion
Sometimes I rerun the tests for debugging in the same directory, and
having it be not writable breaks `rm * -rf`.
2015-05-13 22:18:36 -04:00
Colin Walters
3f9fa58213 tests: Fix writable repo test
When I removed the `transaction` symlink, that made this test start
failing.  Fix it by doing `chmod` on `repo/objects`, which is what the
core `ostree_repo_is_writable()` looks at.
2015-05-13 22:11:39 -04:00
Colin Walters
c2aabcac3b ostree_repo_checkout_tree_at: New API for checkouts
rpm-ostree currently uses ostree_repo_checkout_tree(), which as a side
effect will use the uncompressed objects cache by default.  This is
rather annoying if you're using rpm-ostree on a server-side
repository, because if you then rsync the repo, you'll be syncing out
the uncompressed objects unless you exclude them.

We added the ability to disable the uncompressed cache in the
repository config to fix this, but it's better to allow application
control over this.  The uncompressed cache will in some future version
become opt in as well.

This new API further:
 - Drops the `GFile` usage in favor of `openat` APIs
 - Improves ergonomics by avoiding callers having to query the source
   `GFileInfo` (and carry around a copy of `OSTREE_GIO_FAST_QUERYINFO`)
 - Has a more extensible options structure

Per the comment, I rather crudely have the `ostree checkout` builtin
call both APIs to ensure some testing coverage.

However, I'd like to in the future have easier-to-set-up testing code
that calls `libtest.sh` to set up dummy data.
2015-04-07 15:12:16 -04:00
Giuseppe Scrivano
12bc9a336a tests/basic-test.sh: enable repo-noperm test only for non-root user
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-04-03 09:57:20 +02:00
Matthew Barnes
6b16aba5f9 tests: Add a test case for unwritable repos 2015-03-25 17:24:06 -04:00
Giuseppe Scrivano
aea173b3f8 tests: enforce ${CMD_PREFIX} on all ostree processes
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-03-03 18:32:24 -05:00
Daniel Drake
7c267d6089 libostree: set directory mtimes to 0 on checkout
We already set all file mtimes to 0 so that they are constant
over all checkouts, and can be made constant with a known value from
the system where the ostree was created.

However, this was not happening for directories. Zero their mtimes too.

This is important for shipping a fontconfig cache in the ostree;
the fontconfig cache files embed a directory mtime.
2015-02-18 18:27:18 -05:00
Matthew Barnes
7727fe84d9 Require a PREFIX when deleting refs
Also fix the "ostree refs" help output to not give the impression that
the --delete option takes its own PREFIX argument.

https://bugzilla.gnome.org/show_bug.cgi?id=742454
2015-01-06 10:33:12 -05:00
Colin Walters
d3edda5edc basic-test: Fixup mtime check for bare-user
https://bugzilla.gnome.org/show_bug.cgi?id=741662
2014-12-17 11:34:10 -05:00
Alexander Larsson
a3422791d4 Split out basic tests from test-basic.sh
This will let us reuse them with other repo types

https://bugzilla.gnome.org/show_bug.cgi?id=741125
2014-12-08 10:39:44 +01:00