From 4f02e2b7a4853785a6e2ead60ed7ec848e07bb90 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Wed, 29 Jan 2025 12:52:25 +0100 Subject: test(tests): Also include a test for `useShards = true` --- tests/by-name/a/file.nix | 0 tests/by-name/a/other.nix | 0 tests/by-name/b/file.nix | 0 tests/by-name/b/nothing.lix | 0 tests/by-name/c/file.nix | 0 tests/by-name/empty/file.other | 0 tests/by-name/tripwire.test | 0 tests/no_shards/by-name/a/file.nix | 0 tests/no_shards/by-name/a/other.nix | 0 tests/no_shards/by-name/b/file.nix | 0 tests/no_shards/by-name/b/nothing.lix | 0 tests/no_shards/by-name/c/file.nix | 0 tests/no_shards/by-name/empty/file.other | 0 tests/no_shards/by-name/tripwire.test | 0 tests/no_shards/test.nix | 9 +++++++++ tests/shards/by-name/em/empty/file.other | 0 tests/shards/by-name/fi/first/file.nix | 0 tests/shards/by-name/fi/first/other.nix | 0 tests/shards/by-name/se/second/file.nix | 0 tests/shards/by-name/se/second/nothing.lix | 0 tests/shards/by-name/th/third/file.nix | 0 tests/shards/by-name/tripwire.test | 0 tests/shards/test.nix | 9 +++++++++ tests/test.nix | 9 --------- 24 files changed, 18 insertions(+), 9 deletions(-) delete mode 100644 tests/by-name/a/file.nix delete mode 100644 tests/by-name/a/other.nix delete mode 100644 tests/by-name/b/file.nix delete mode 100644 tests/by-name/b/nothing.lix delete mode 100644 tests/by-name/c/file.nix delete mode 100644 tests/by-name/empty/file.other delete mode 100644 tests/by-name/tripwire.test create mode 100644 tests/no_shards/by-name/a/file.nix create mode 100644 tests/no_shards/by-name/a/other.nix create mode 100644 tests/no_shards/by-name/b/file.nix create mode 100644 tests/no_shards/by-name/b/nothing.lix create mode 100644 tests/no_shards/by-name/c/file.nix create mode 100644 tests/no_shards/by-name/empty/file.other create mode 100644 tests/no_shards/by-name/tripwire.test create mode 100644 tests/no_shards/test.nix create mode 100644 tests/shards/by-name/em/empty/file.other create mode 100644 tests/shards/by-name/fi/first/file.nix create mode 100644 tests/shards/by-name/fi/first/other.nix create mode 100644 tests/shards/by-name/se/second/file.nix create mode 100644 tests/shards/by-name/se/second/nothing.lix create mode 100644 tests/shards/by-name/th/third/file.nix create mode 100644 tests/shards/by-name/tripwire.test create mode 100644 tests/shards/test.nix delete mode 100644 tests/test.nix (limited to 'tests') diff --git a/tests/by-name/a/file.nix b/tests/by-name/a/file.nix deleted file mode 100644 index e69de29..0000000 diff --git a/tests/by-name/a/other.nix b/tests/by-name/a/other.nix deleted file mode 100644 index e69de29..0000000 diff --git a/tests/by-name/b/file.nix b/tests/by-name/b/file.nix deleted file mode 100644 index e69de29..0000000 diff --git a/tests/by-name/b/nothing.lix b/tests/by-name/b/nothing.lix deleted file mode 100644 index e69de29..0000000 diff --git a/tests/by-name/c/file.nix b/tests/by-name/c/file.nix deleted file mode 100644 index e69de29..0000000 diff --git a/tests/by-name/empty/file.other b/tests/by-name/empty/file.other deleted file mode 100644 index e69de29..0000000 diff --git a/tests/by-name/tripwire.test b/tests/by-name/tripwire.test deleted file mode 100644 index e69de29..0000000 diff --git a/tests/no_shards/by-name/a/file.nix b/tests/no_shards/by-name/a/file.nix new file mode 100644 index 0000000..e69de29 diff --git a/tests/no_shards/by-name/a/other.nix b/tests/no_shards/by-name/a/other.nix new file mode 100644 index 0000000..e69de29 diff --git a/tests/no_shards/by-name/b/file.nix b/tests/no_shards/by-name/b/file.nix new file mode 100644 index 0000000..e69de29 diff --git a/tests/no_shards/by-name/b/nothing.lix b/tests/no_shards/by-name/b/nothing.lix new file mode 100644 index 0000000..e69de29 diff --git a/tests/no_shards/by-name/c/file.nix b/tests/no_shards/by-name/c/file.nix new file mode 100644 index 0000000..e69de29 diff --git a/tests/no_shards/by-name/empty/file.other b/tests/no_shards/by-name/empty/file.other new file mode 100644 index 0000000..e69de29 diff --git a/tests/no_shards/by-name/tripwire.test b/tests/no_shards/by-name/tripwire.test new file mode 100644 index 0000000..e69de29 diff --git a/tests/no_shards/test.nix b/tests/no_shards/test.nix new file mode 100644 index 0000000..9bc25b5 --- /dev/null +++ b/tests/no_shards/test.nix @@ -0,0 +1,9 @@ +let + nixLib = import ../../default.nix {}; +in + nixLib.mkByName { + useShards = false; + baseDirectory = ./by-name; + # fileName = "file.nix"; + fileRegex = ".*\.nix"; + } diff --git a/tests/shards/by-name/em/empty/file.other b/tests/shards/by-name/em/empty/file.other new file mode 100644 index 0000000..e69de29 diff --git a/tests/shards/by-name/fi/first/file.nix b/tests/shards/by-name/fi/first/file.nix new file mode 100644 index 0000000..e69de29 diff --git a/tests/shards/by-name/fi/first/other.nix b/tests/shards/by-name/fi/first/other.nix new file mode 100644 index 0000000..e69de29 diff --git a/tests/shards/by-name/se/second/file.nix b/tests/shards/by-name/se/second/file.nix new file mode 100644 index 0000000..e69de29 diff --git a/tests/shards/by-name/se/second/nothing.lix b/tests/shards/by-name/se/second/nothing.lix new file mode 100644 index 0000000..e69de29 diff --git a/tests/shards/by-name/th/third/file.nix b/tests/shards/by-name/th/third/file.nix new file mode 100644 index 0000000..e69de29 diff --git a/tests/shards/by-name/tripwire.test b/tests/shards/by-name/tripwire.test new file mode 100644 index 0000000..e69de29 diff --git a/tests/shards/test.nix b/tests/shards/test.nix new file mode 100644 index 0000000..6057b82 --- /dev/null +++ b/tests/shards/test.nix @@ -0,0 +1,9 @@ +let + nixLib = import ../../default.nix {}; +in + nixLib.mkByName { + useShards = true; + baseDirectory = ./by-name; + fileName = "file.nix"; + # fileRegex = ".*\.nix"; + } diff --git a/tests/test.nix b/tests/test.nix deleted file mode 100644 index 5ae7da8..0000000 --- a/tests/test.nix +++ /dev/null @@ -1,9 +0,0 @@ -let - nixLib = import ../default.nix {}; -in - nixLib.mkByName { - useShards = false; - baseDirectory = ./by-name; - # fileName = "file.nix"; - fileRegex = ".*\.nix"; - } -- cgit 1.4.1