summaryrefslogtreecommitdiffstats
path: root/nixos
diff options
context:
space:
mode:
authorRobert Hensing <roberth@users.noreply.github.com>2020-12-14 16:49:47 +0100
committerGitHub <noreply@github.com>2020-12-14 16:49:47 +0100
commitb37c00ab90d9f3216df7990d85ab863e2946a129 (patch)
tree0c632b3f8ad344fbfa5729d1483cbbf9309ee25f /nixos
parentff165582a6b5029af6c181200354094290f32c0c (diff)
parentccdfb9c6ead58c3116f1f13ecab27143a9664e09 (diff)
Merge pull request #106441 from hercules-ci/cassandra-passthru-tests
Cassandra passthru tests
Diffstat (limited to 'nixos')
-rw-r--r--nixos/lib/testing-python.nix5
-rw-r--r--nixos/tests/all-tests.nix5
-rw-r--r--nixos/tests/cassandra.nix10
3 files changed, 14 insertions, 6 deletions
diff --git a/nixos/lib/testing-python.nix b/nixos/lib/testing-python.nix
index 13abfb9a111d..6192be1cd053 100644
--- a/nixos/lib/testing-python.nix
+++ b/nixos/lib/testing-python.nix
@@ -67,6 +67,8 @@ rec {
LOGFILE=/dev/null tests='exec(os.environ["testScript"])' ${driver}/bin/nixos-test-driver
'';
+
+ passthru = driver.passthru;
};
@@ -76,6 +78,7 @@ rec {
, name ? "unnamed"
# Skip linting (mainly intended for faster dev cycles)
, skipLint ? false
+ , passthru ? {}
, ...
} @ t:
let
@@ -137,7 +140,7 @@ rec {
testScript = testScript';
preferLocalBuild = true;
testName = name;
- passthru = {
+ passthru = passthru // {
inherit nodes;
};
}
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix
index de77bef2535e..e4f4b891ceb2 100644
--- a/nixos/tests/all-tests.nix
+++ b/nixos/tests/all-tests.nix
@@ -49,7 +49,10 @@ in
cadvisor = handleTestOn ["x86_64-linux"] ./cadvisor.nix {};
cage = handleTest ./cage.nix {};
cagebreak = handleTest ./cagebreak.nix {};
- cassandra = handleTest ./cassandra.nix {};
+ cassandra_2_1 = handleTest ./cassandra.nix { testPackage = pkgs.cassandra_2_1; };
+ cassandra_2_2 = handleTest ./cassandra.nix { testPackage = pkgs.cassandra_2_2; };
+ cassandra_3_0 = handleTest ./cassandra.nix { testPackage = pkgs.cassandra_3_0; };
+ cassandra_3_11 = handleTest ./cassandra.nix { testPackage = pkgs.cassandra_3_11; };
ceph-multi-node = handleTestOn ["x86_64-linux"] ./ceph-multi-node.nix {};
ceph-single-node = handleTestOn ["x86_64-linux"] ./ceph-single-node.nix {};
certmgr = handleTest ./certmgr.nix {};
diff --git a/nixos/tests/cassandra.nix b/nixos/tests/cassandra.nix
index 05607956a9d6..bef3105f0a9e 100644
--- a/nixos/tests/cassandra.nix
+++ b/nixos/tests/cassandra.nix
@@ -1,7 +1,5 @@
-import ./make-test-python.nix ({ pkgs, lib, ... }:
+import ./make-test-python.nix ({ pkgs, lib, testPackage ? pkgs.cassandra, ... }:
let
- # Change this to test a different version of Cassandra:
- testPackage = pkgs.cassandra;
clusterName = "NixOS Automated-Test Cluster";
testRemoteAuth = lib.versionAtLeast testPackage.version "3.11";
@@ -47,7 +45,7 @@ let
};
in
{
- name = "cassandra";
+ name = "cassandra-${testPackage.version}";
meta = {
maintainers = with lib.maintainers; [ johnazoidberg ];
};
@@ -128,4 +126,8 @@ in
"nodetool status -p ${jmxPortStr} --resolve-ip | egrep '^UN[[:space:]]+cass2'"
)
'';
+
+ passthru = {
+ inherit testPackage;
+ };
})