forked from mirrors/nixpkgs
nixos/cassandra: Test clusterName
This commit is contained in:
parent
4c880fd742
commit
2d014f4448
|
@ -2,9 +2,11 @@ import ./make-test.nix ({ pkgs, ...}:
|
||||||
let
|
let
|
||||||
# Change this to test a different version of Cassandra:
|
# Change this to test a different version of Cassandra:
|
||||||
testPackage = pkgs.cassandra;
|
testPackage = pkgs.cassandra;
|
||||||
|
clusterName = "NixOS Automated-Test Cluster";
|
||||||
|
|
||||||
cassandraCfg = ipAddress:
|
cassandraCfg = ipAddress:
|
||||||
{ enable = true;
|
{ enable = true;
|
||||||
|
inherit clusterName;
|
||||||
listenAddress = ipAddress;
|
listenAddress = ipAddress;
|
||||||
rpcAddress = ipAddress;
|
rpcAddress = ipAddress;
|
||||||
extraConfig =
|
extraConfig =
|
||||||
|
@ -48,6 +50,11 @@ in
|
||||||
$cass0->waitUntilSucceeds("nc -z localhost 7199");
|
$cass0->waitUntilSucceeds("nc -z localhost 7199");
|
||||||
$cass0->succeed("nodetool status --resolve-ip | egrep '^UN[[:space:]]+cass0'");
|
$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
|
# Check cluster interaction
|
||||||
subtest "Bring up cluster", sub {
|
subtest "Bring up cluster", sub {
|
||||||
|
|
Loading…
Reference in a new issue