mirror of
https://github.com/nix-community/nix-on-droid.git
synced 2025-11-08 19:46:07 +01:00
tests: simplify clean up logic for ~/.config/nixpkgs
This commit is contained in:
parent
43b94dee09
commit
b377c6c902
3 changed files with 1 additions and 4 deletions
|
|
@ -24,7 +24,6 @@ load lib
|
|||
assert_no_command vi
|
||||
|
||||
# check that reverting works too
|
||||
rm -f ~/.config/nix/nix.conf ~/.config/nixpkgs/flake.nix
|
||||
switch_to_default_config
|
||||
assert_command vi
|
||||
assert_no_command dash zsh
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@ load lib
|
|||
assert_no_command vi
|
||||
|
||||
# check that reverting works too
|
||||
rm -f ~/.config/nix/nix.conf ~/.config/nixpkgs/flake.nix
|
||||
switch_to_default_config
|
||||
assert_command vi
|
||||
assert_no_command unzip
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ setup() {
|
|||
|
||||
# restore to pre-testing generation before the start of each test
|
||||
$DEFAULT_ACTIVATE_SCRIPT
|
||||
rm -rf ~/.config/nixpkgs/*
|
||||
|
||||
# build and activate the version of nix-on-droid that is subject to test
|
||||
switch_to_default_config
|
||||
|
|
@ -45,8 +46,6 @@ assert_no_command() {
|
|||
}
|
||||
|
||||
switch_to_default_config() {
|
||||
rm -rf ~/.config/nix ~/.config/nixpkgs
|
||||
mkdir -p ~/.config/nix ~/.config/nixpkgs
|
||||
cat "$CHANNEL_DIR/modules/environment/login/nix-on-droid.nix.default" \
|
||||
> ~/.config/nixpkgs/nix-on-droid.nix
|
||||
nix-on-droid switch
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue