summaryrefslogtreecommitdiffstats
path: root/nixos/tests/cassandra.nix
diff options
context:
space:
mode:
authorDaniel Schaefer <git@danielschaefer.me>2019-04-23 05:02:30 +0200
committerDaniel Schaefer <git@danielschaefer.me>2019-06-13 04:36:41 +0200
commit2d014f444852f3ef240a6babf46cd501f8557c95 (patch)
treef142615ee5dbf1669ede4c1bedd9bda0283d9b26 /nixos/tests/cassandra.nix
parent4c880fd7426cafbc5091561d20062511e5eb967f (diff)
nixos/cassandra: Test clusterName
Diffstat (limited to 'nixos/tests/cassandra.nix')
-rw-r--r--nixos/tests/cassandra.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/nixos/tests/cassandra.nix b/nixos/tests/cassandra.nix
index 208e94c64c96..a5925e234c4d 100644
--- a/nixos/tests/cassandra.nix
+++ b/nixos/tests/cassandra.nix
@@ -2,9 +2,11 @@ import ./make-test.nix ({ pkgs, ...}:
let
# Change this to test a different version of Cassandra:
testPackage = pkgs.cassandra;
+ clusterName = "NixOS Automated-Test Cluster";
cassandraCfg = ipAddress:
{ enable = true;
+ inherit clusterName;
listenAddress = ipAddress;
rpcAddress = ipAddress;
extraConfig =
@@ -48,6 +50,11 @@ in
$cass0->waitUntilSucceeds("nc -z localhost 7199");
$cass0->succeed("nodetool status --resolve-ip | egrep '^UN[[:space:]]+cass0'");
};
+ subtest "Cluster name was set", sub {
+ $cass0->waitForUnit("cassandra.service");
+ $cass0->waitUntilSucceeds("nc -z localhost 7199");
+ $cass0->waitUntilSucceeds("nodetool describecluster | grep 'Name: ${clusterName}'");
+ };
# Check cluster interaction
subtest "Bring up cluster", sub {