From e679ee91fad3525ce8cfb1b1a34023ac88afc274 Mon Sep 17 00:00:00 2001 From: Matt Sturgeon Date: Fri, 27 Dec 2024 18:49:02 +0000 Subject: [PATCH] tests: omit `default` suffix in test names If the test file is `default.nix`, we don't need to append the filename to the test namespace. --- tests/fetch-tests.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/fetch-tests.nix b/tests/fetch-tests.nix index 39f03fae..e6805b44 100644 --- a/tests/fetch-tests.nix +++ b/tests/fetch-tests.nix @@ -36,7 +36,9 @@ let in if type == "regular" then lib.optional (lib.hasSuffix ".nix" name) ( - handleTestFile file (namespace ++ [ (lib.removeSuffix ".nix" name) ]) + handleTestFile file ( + namespace ++ lib.optional (name != "default.nix") (lib.removeSuffix ".nix" name) + ) ) else fetchTests file (namespace ++ [ name ]);