summaryrefslogtreecommitdiff
path: root/tests/test-admin-deploy-2.sh
Commit message (Collapse)AuthorAgeFilesLines
* Update FSF license notices to use URL instead of addressJoseph Marrero2021-12-071-3/+1
|
* *: rename master to main in tests & examplesTimothée Ravier2021-05-071-5/+5
|
* admin/pin: Enforce that index is a numberColin Walters2020-08-191-1/+8
| | | | | | | Validate that we're parsing a number; we want to guard against typos. Closes: https://github.com/ostreedev/ostree/issues/2171
* admin: allow multiple args for pin subcommandRafael Fonseca2019-06-171-2/+1
| | | | | | | | | Fixes #1816 Signed-off-by: Rafael Fonseca <r4f4rfs@gmail.com> Closes: #1874 Approved by: rfairley
* deploy: Change BootLoaderSpec filenames so they can be used for sortingJavier Martinez Canillas2018-06-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the BLS snippets are named ostree-$ID-$VARIANT_ID-$index.conf, but the BLS config files are actually sorted by using the version field which is the inverse of the index. In most places, _ostree_sysroot_read_boot_loader_configs() is used to get the BLS files and this function already returns them sorted by the version field. The only place where the index trailing number is used is in the ostree-grub-generator script that lists the BLS files to populate the grub config file. But for some bootloaders the BLS filename is the criteria for sorting by taking the filename as a string version. So on these bootloaders the BLS entries will be listed in the reverse order. To avoid that, change the BLS snippets filename to have the version field instead of the index and also to have the version before deployment name. Make the filenames to be of the form ostree-$version-$ID-$VARIANT_ID.conf so the version is before the deployment name. Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> Closes: #1654 Approved by: cgwalters
* lib/deploy: Also compare deployment csum versionsJonathan Lebon2018-04-241-1/+14
| | | | | | | | | | | | | When comparing deployments to determine whether we need a new bootversion, we should also check whether the commit "version" metadata is the same. Otherwise, we may end up with the a bootconfig whose `title` includes a version that doesn't match the one from the deployment checksum. Closes: https://github.com/projectatomic/rpm-ostree/issues/1343 Closes: #1556 Approved by: cgwalters
* sysroot: Add concept of deployment "pinning" đź“ŚColin Walters2018-02-261-1/+48
| | | | | | | | | | | | | Example user story: Jane rebases her OS to a new major version N, and wants to keep around N-1 even after a few upgrades for a while so she can easily roll back. I plan to add `rpm-ostree rebase --pin` to opt-in to this for example. Builds on the new `libostree-transient` group to store pinning state there. Closes: https://github.com/ostreedev/ostree/issues/1460 Closes: #1464 Approved by: jlebon
* 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
* tree-wide: Replace archive-z2 with archiveColin Walters2017-09-011-1/+1
| | | | | | | | | | | | In almost all places. There are just a few exceptions; one tricky bit for example is that the repo config must still have `mode=archive-z2`, since `archive` used to mean something else. (We could very likely just get rid of that check, but eh, later). I also added a test that one can still do `ostree repo init --mode=archive-z2`. Closes: #1125 Approved by: jlebon
* tests: Port to glib-tap.mk, make `make check` run all of the testsColin Walters2016-03-031-5/+1
| | | | | | | | | | | | | | | | | | 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-2/+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.
* tests: prefix invocation of ostree with where missingGiuseppe Scrivano2015-11-161-6/+6
| | | | | | | | | | And add a syntax rule to avoid this in future. Fixed by: sed -i -e 's|^ostree |${CMD_PREFIX} ostree |g' tests/*.sh Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* tests: Export OSTREE_SYSROOT in setup_os_repositoryMatthew Barnes2015-07-161-4/+5
| | | | | | Eliminates the need for constantly passing --sysroot=sysroot, but also makes ostree place remote configs for sysroot/ostree/repo in sysroot/etc/ostree/remotes.d where they should have been all along.
* tests: enforce ${CMD_PREFIX} on all ostree processesGiuseppe Scrivano2015-03-031-2/+2
| | | | Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* tests: Fix two bugs in tests revealed by new remote changesColin Walters2014-12-171-1/+0
|
* pull: Verify commits with gpg signatures from detached metadataJeremy Whiting2013-09-291-2/+2
| | | | | | | | | | | This uses gpgv for verification against DATADIR/ostree/pubring.gpg by default. The keyring can be overridden by specifying OSTREE_GPG_HOME. Add a unit test for commit signing with gpg key and verifying on pull; to implement this we ship a test GPG key generated with no password for Ostree Tester <test@test.com>. Change all of the existing tests to disable GPG verification.
* deploy: Correctly swap bootloader version with new boot checksumsColin Walters2013-09-201-4/+8
| | | | | | | | | | | | | | If we had two deployments with different boot checksums, and were trying to remove the one that was the same and add a new one (the normal case), we'd end up assuming due to comparison with 0 that we only needed to do the fast subbootversion swap. Fix this by actually putting 1 where we really mean 1. And update the tests to verify the fix; I have double-verified by undoing the fix, and noting that the test fails. https://bugzilla.gnome.org/show_bug.cgi?id=708351
* tests: don't create a syslinux stub unconditionally in libtestJavier Martinez Canillas2013-09-151-1/+1
| | | | | | | | | | | | | | | libtest.sh has an setup_os_repository() helper function tha is used by many tests to setup an OSTree initial repository. This function creates an syslinux configuration unconditionally but OSTree supports other bootloader backends besides syslinux. So, is better to conditionally create a syslinux configuration only when it is needed. https://bugzilla.gnome.org/show_bug.cgi?id=708069 Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
* admin: Rename prune -> cleanup, avoid doing repo prune twiceColin Walters2013-07-151-0/+6
| | | | | | | Calling it "cleanup" is better since it does more than repo pruning. We were also doing a prune twice; ot_admin_cleanup() already does one, so drop the bits to do it in cleanup.c.
* tests: Drop numeric prefixColin Walters2013-07-091-0/+58
Theoretically it's useful to have layers of tests, but in practice it's just annoying to assign numbers.