tests: remove with lib (#6511)

This commit is contained in:
Austin Horstman 2025-02-21 21:20:07 -08:00 committed by GitHub
parent e495cd8c80
commit 439a125afe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
100 changed files with 77 additions and 398 deletions

View file

@ -1,18 +1,13 @@
modulePath:
{ config, lib, ... }:
with lib;
let
moduleName = concatStringsSep "." modulePath;
moduleName = lib.concatStringsSep "." modulePath;
firefoxMockOverlay = import ./setup-firefox-mock-overlay.nix modulePath;
in {
imports = [ firefoxMockOverlay ];
config = mkIf config.test.enableBig (setAttrByPath modulePath {
config = lib.mkIf config.test.enableBig (lib.setAttrByPath modulePath {
enable = true;
enableGnomeExtensions = true;
} // {

View file

@ -1,20 +1,15 @@
modulePath:
{ config, lib, pkgs, ... }:
with lib;
let
cfg = getAttrFromPath modulePath config;
cfg = lib.getAttrFromPath modulePath config;
firefoxMockOverlay = import ./setup-firefox-mock-overlay.nix modulePath;
in {
imports = [ firefoxMockOverlay ];
config = mkIf config.test.enableBig ({
config = lib.mkIf config.test.enableBig ({
home.stateVersion = "23.05";
} // setAttrByPath modulePath {
} // lib.setAttrByPath modulePath {
enable = true;
policies = { BlockAboutConfig = true; };
package = pkgs.${cfg.wrappedPackageName}.override {

View file

@ -1,20 +1,15 @@
modulePath:
{ config, lib, pkgs, ... }:
with lib;
{ config, lib, ... }:
let
cfg = getAttrFromPath modulePath config;
cfg = lib.getAttrFromPath modulePath config;
firefoxMockOverlay = import ./setup-firefox-mock-overlay.nix modulePath;
in {
imports = [ firefoxMockOverlay ];
config = lib.mkIf config.test.enableBig ({
home.stateVersion = "19.09";
} // setAttrByPath modulePath { enable = true; } // {
} // lib.setAttrByPath modulePath { enable = true; } // {
nmt.script = ''
assertFileRegex \
home-path/bin/${cfg.wrappedPackageName} \