nixosTests.hbase{2,_2_4,_2_5,3}: handleTest -> runTest

This commit is contained in:
Sizhe Zhao 2025-07-09 12:48:05 +08:00
parent a698ac1214
commit 2522b5207f
No known key found for this signature in database
GPG Key ID: ED1807251A7DA08F
2 changed files with 46 additions and 40 deletions

View File

@ -649,10 +649,22 @@ in
harmonia = runTest ./harmonia.nix; harmonia = runTest ./harmonia.nix;
headscale = runTest ./headscale.nix; headscale = runTest ./headscale.nix;
healthchecks = runTest ./web-apps/healthchecks.nix; healthchecks = runTest ./web-apps/healthchecks.nix;
hbase2 = handleTest ./hbase.nix { package = pkgs.hbase2; }; hbase2 = runTest {
hbase_2_5 = handleTest ./hbase.nix { package = pkgs.hbase_2_5; }; imports = [ ./hbase.nix ];
hbase_2_4 = handleTest ./hbase.nix { package = pkgs.hbase_2_4; }; _module.args.getPackage = pkgs: pkgs.hbase2;
hbase3 = handleTest ./hbase.nix { package = pkgs.hbase3; }; };
hbase_2_5 = runTest {
imports = [ ./hbase.nix ];
_module.args.getPackage = pkgs: pkgs.hbase_2_5;
};
hbase_2_4 = runTest {
imports = [ ./hbase.nix ];
_module.args.getPackage = pkgs: pkgs.hbase_2_4;
};
hbase3 = runTest {
imports = [ ./hbase.nix ];
_module.args.getPackage = pkgs: pkgs.hbase3;
};
hedgedoc = runTest ./hedgedoc.nix; hedgedoc = runTest ./hedgedoc.nix;
herbstluftwm = runTest ./herbstluftwm.nix; herbstluftwm = runTest ./herbstluftwm.nix;
homebox = runTest ./homebox.nix; homebox = runTest ./homebox.nix;

View File

@ -1,10 +1,4 @@
import ./make-test-python.nix ( { getPackage, lib, ... }:
{
pkgs,
lib,
package ? pkgs.hbase,
...
}:
{ {
name = "hbase-standalone"; name = "hbase-standalone";
@ -12,9 +6,11 @@ import ./make-test-python.nix (
maintainers = [ illustris ]; maintainers = [ illustris ];
}; };
nodes = { nodes.hbase =
hbase =
{ pkgs, ... }: { pkgs, ... }:
let
package = getPackage pkgs;
in
{ {
services.hbase-standalone = { services.hbase-standalone = {
enable = true; enable = true;
@ -23,11 +19,10 @@ import ./make-test-python.nix (
# This setting and standalone mode are not suitable for production # This setting and standalone mode are not suitable for production
settings."hbase.unsafe.stream.capability.enforce" = "false"; settings."hbase.unsafe.stream.capability.enforce" = "false";
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = [
package package
]; ];
}; };
};
testScript = '' testScript = ''
start_all() start_all()
@ -36,4 +31,3 @@ import ./make-test-python.nix (
assert "NAME => 'f1'" in hbase.succeed("echo \"describe 't1'\" | sudo -u hbase hbase shell -n") assert "NAME => 'f1'" in hbase.succeed("echo \"describe 't1'\" | sudo -u hbase hbase shell -n")
''; '';
} }
)