[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
13/16: tests: Check 'guix home reconfigure' for a second generation.
From: |
guix-commits |
Subject: |
13/16: tests: Check 'guix home reconfigure' for a second generation. |
Date: |
Thu, 10 Mar 2022 05:43:55 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 5fabaf112858c5c5e8787e83f8f2002fdc710917
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Fri Feb 18 23:07:21 2022 +0100
tests: Check 'guix home reconfigure' for a second generation.
* tests/guix-home.sh: Invoke "guix home reconfigure" a second time with
a modify config file and check the result.
---
tests/guix-home.sh | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/tests/guix-home.sh b/tests/guix-home.sh
index 3b397649cc..f054d15172 100644
--- a/tests/guix-home.sh
+++ b/tests/guix-home.sh
@@ -108,6 +108,7 @@ EOF
# Make sure preexisting files were backed up.
grep "overridden" "$HOME"/*guix-home*backup/.bashrc
grep "overridden" "$HOME"/*guix-home*backup/.config/test.conf
+ rm -r "$HOME"/*guix-home*backup
#
# Test 'guix home describe'.
@@ -131,6 +132,28 @@ EOF
}
test "$(canonical_file_name)" == "$(readlink "${HOME}/.guix-home")"
+ #
+ # Configure a new generation.
+ #
+
+ # Change the bashrc snippet content and comment out one service.
+ sed -i "home.scm" -e's/the content of/the NEW content of/g'
+ sed -i "home.scm" -e"s/(simple-service 'test-config/#;(simple-service
'test-config/g"
+
+ guix home reconfigure "${test_directory}/home.scm"
+ test "$(tail -n 2 "${HOME}/.bashrc")" == "\
+# dot-bashrc test file for guix home
+# the NEW content of bashrc-test-config.sh"
+
+ # This file must have been removed and not backed up.
+ ! test -e "$HOME/.config/test.conf"
+ ! test -e "$HOME"/*guix-home*backup/.config/test.conf
+
+ test "$(cat "$(configuration_file)")" == "$(cat home.scm)"
+ test "$(canonical_file_name)" == "$(readlink "${HOME}/.guix-home")"
+
+ test $(guix home list-generations | grep "^Generation" | wc -l) -eq 2
+
#
# Test 'guix home search'.
#
- 04/16: gnu: gnome-sudoku: Remove input labels., (continued)
- 04/16: gnu: gnome-sudoku: Remove input labels., guix-commits, 2022/03/10
- 05/16: home: symlink-manager: Clarify module imports., guix-commits, 2022/03/10
- 09/16: home: symlink-manager: Remove 'empty-directory?' and avoid TOCTTOU race., guix-commits, 2022/03/10
- 02/16: gnu: gnome-arcade: Update to 0.240., guix-commits, 2022/03/10
- 08/16: home: symlink-manager: Use 'file-is-directory?'., guix-commits, 2022/03/10
- 16/16: home: symlink-manager: Rename "path" to "file" where appropriate., guix-commits, 2022/03/10
- 07/16: home: symlink-manager: Use 'for-each' when used for effects., guix-commits, 2022/03/10
- 01/16: maint: 'assert-binaries-available' only checks ci.guix.gnu.org., guix-commits, 2022/03/10
- 06/16: home: symlink-manager: Move helper procedures as top-level defines., guix-commits, 2022/03/10
- 11/16: tests: Make sure 'guix home reconfigure' backs up files., guix-commits, 2022/03/10
- 13/16: tests: Check 'guix home reconfigure' for a second generation.,
guix-commits <=
- 12/16: tests: Simplify use of 'local-file' in 'tests/guix-home.sh'., guix-commits, 2022/03/10
- 14/16: home: symlink-manager: 'cleanup-symlinks' uses 'file-system-fold'., guix-commits, 2022/03/10
- 10/16: home: symlink-manager: Avoid extra 'lstat' call., guix-commits, 2022/03/10
- 15/16: home: symlink-manager: 'create-symlinks' uses 'file-system-fold'., guix-commits, 2022/03/10