aboutsummaryrefslogtreecommitdiff
path: root/tests/flakes.sh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-07-12 14:37:45 +0200
committerEelco Dolstra <edolstra@gmail.com>2019-07-12 14:37:45 +0200
commitb45628a172dd3a3ba863cd231f1446c7cd901cf7 (patch)
treef3f38353572967c0b314c8aa08af13bfe1eb7b0f /tests/flakes.sh
parentb29cec76971ff1949415f76c82fa0ecf699ac264 (diff)
Fix flake tests
Diffstat (limited to 'tests/flakes.sh')
-rw-r--r--tests/flakes.sh20
1 files changed, 12 insertions, 8 deletions
diff --git a/tests/flakes.sh b/tests/flakes.sh
index d2b168712..406e5b632 100644
--- a/tests/flakes.sh
+++ b/tests/flakes.sh
@@ -31,7 +31,7 @@ cat > $flake1Dir/flake.nix <<EOF
{
name = "flake1";
- epoch = 201906;
+ edition = 201906;
description = "Bla bla";
@@ -50,7 +50,7 @@ cat > $flake2Dir/flake.nix <<EOF
{
name = "flake2";
- epoch = 201906;
+ edition = 201906;
inputs = [ "flake1" ];
@@ -69,7 +69,7 @@ cat > $flake3Dir/flake.nix <<EOF
{
name = "flake3";
- epoch = 201906;
+ edition = 201906;
inputs = [ "flake2" ];
@@ -189,7 +189,7 @@ cat > $flake3Dir/flake.nix <<EOF
{
name = "flake3";
- epoch = 201906;
+ edition = 201906;
inputs = [ "flake1" "flake2" ];
@@ -211,11 +211,13 @@ nix build -o $TEST_ROOT/result --flake-registry $registry $flake3Dir:sth
# Check whether it saved the lockfile
[[ ! (-z $(git -C $flake3Dir diff master)) ]]
+git -C $flake3Dir add flake.lock
+
git -C $flake3Dir commit -m 'Add lockfile'
-# Unsupported epochs should be an error.
+# Unsupported editions should be an error.
sed -i $flake3Dir/flake.nix -e s/201906/201909/
-nix build -o $TEST_ROOT/result --flake-registry $registry $flake3Dir:sth 2>&1 | grep 'unsupported epoch'
+nix build -o $TEST_ROOT/result --flake-registry $registry $flake3Dir:sth 2>&1 | grep 'unsupported edition'
# Test whether registry caching works.
nix flake list --flake-registry file://$registry | grep -q flake3
@@ -242,7 +244,7 @@ cat > $flake3Dir/flake.nix <<EOF
{
name = "flake3";
- epoch = 201906;
+ edition = 201906;
inputs = [ "flake1" "flake2" ];
@@ -277,6 +279,8 @@ git -C $flake3Dir commit -m 'Add nonFlakeInputs'
# nonFlakeInputs.
nix build -o $TEST_ROOT/result --flake-registry $registry $flake3Dir:sth
+git -C $flake3Dir add flake.lock
+
git -C $flake3Dir commit -m 'Update nonFlakeInputs'
nix build -o $TEST_ROOT/result --flake-registry $registry flake3:fnord
@@ -306,7 +310,7 @@ cat > $flake3Dir/flake.nix <<EOF
{
name = "flake3";
- epoch = 201906;
+ edition = 201906;
inputs = [ "flake1" "flake2" ];