cassandra: Add passthru.tests
This commit is contained in:
parent
72a5301610
commit
a298710dd1
7 changed files with 32 additions and 8 deletions
|
@ -49,7 +49,10 @@ in
|
||||||
cadvisor = handleTestOn ["x86_64-linux"] ./cadvisor.nix {};
|
cadvisor = handleTestOn ["x86_64-linux"] ./cadvisor.nix {};
|
||||||
cage = handleTest ./cage.nix {};
|
cage = handleTest ./cage.nix {};
|
||||||
cagebreak = handleTest ./cagebreak.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-multi-node = handleTestOn ["x86_64-linux"] ./ceph-multi-node.nix {};
|
||||||
ceph-single-node = handleTestOn ["x86_64-linux"] ./ceph-single-node.nix {};
|
ceph-single-node = handleTestOn ["x86_64-linux"] ./ceph-single-node.nix {};
|
||||||
certmgr = handleTest ./certmgr.nix {};
|
certmgr = handleTest ./certmgr.nix {};
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
import ./make-test-python.nix ({ pkgs, lib, ... }:
|
import ./make-test-python.nix ({ pkgs, lib, testPackage ? pkgs.cassandra, ... }:
|
||||||
let
|
let
|
||||||
# Change this to test a different version of Cassandra:
|
|
||||||
testPackage = pkgs.cassandra;
|
|
||||||
clusterName = "NixOS Automated-Test Cluster";
|
clusterName = "NixOS Automated-Test Cluster";
|
||||||
|
|
||||||
testRemoteAuth = lib.versionAtLeast testPackage.version "3.11";
|
testRemoteAuth = lib.versionAtLeast testPackage.version "3.11";
|
||||||
|
@ -47,7 +45,7 @@ let
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
name = "cassandra";
|
name = "cassandra-${testPackage.version}";
|
||||||
meta = {
|
meta = {
|
||||||
maintainers = with lib.maintainers; [ johnazoidberg ];
|
maintainers = with lib.maintainers; [ johnazoidberg ];
|
||||||
};
|
};
|
||||||
|
@ -128,4 +126,8 @@ in
|
||||||
"nodetool status -p ${jmxPortStr} --resolve-ip | egrep '^UN[[:space:]]+cass2'"
|
"nodetool status -p ${jmxPortStr} --resolve-ip | egrep '^UN[[:space:]]+cass2'"
|
||||||
)
|
)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
inherit testPackage;
|
||||||
|
};
|
||||||
})
|
})
|
||||||
|
|
|
@ -3,4 +3,5 @@
|
||||||
callPackage ./generic.nix (args // {
|
callPackage ./generic.nix (args // {
|
||||||
version = "2.1.22";
|
version = "2.1.22";
|
||||||
sha256 = "1wk57dz0kmc6d5y8d8dkx269lzh3ark3751z734gxncwdlclcyz3";
|
sha256 = "1wk57dz0kmc6d5y8d8dkx269lzh3ark3751z734gxncwdlclcyz3";
|
||||||
|
generation = "2_1";
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{ callPackage, ... } @ args:
|
{ callPackage, ... } @ args:
|
||||||
|
|
||||||
callPackage ./generic.nix (args // {
|
callPackage ./generic.nix (args // {
|
||||||
version = "2.2.19";
|
version = "2.2.14";
|
||||||
sha256 = "1f8axpxxpmzlb22k3lqsnw3096qjp6xd36brvq5xbdk698jw15jl";
|
sha256 = "1b2x3q1ach44qg07sh8wr7d8a10n36w5522drd3p35djbiwa3d9q";
|
||||||
|
generation = "2_2";
|
||||||
})
|
})
|
||||||
|
|
|
@ -3,4 +3,5 @@
|
||||||
callPackage ./generic.nix (args // {
|
callPackage ./generic.nix (args // {
|
||||||
version = "3.0.23";
|
version = "3.0.23";
|
||||||
sha256 = "0cbia20bggq85q2p6gsybw045qdfqxd5xv8ihppq1hwl21sb2klz";
|
sha256 = "0cbia20bggq85q2p6gsybw045qdfqxd5xv8ihppq1hwl21sb2klz";
|
||||||
|
generation = "3_0";
|
||||||
})
|
})
|
||||||
|
|
|
@ -3,4 +3,5 @@
|
||||||
callPackage ./generic.nix (args // {
|
callPackage ./generic.nix (args // {
|
||||||
version = "3.11.9";
|
version = "3.11.9";
|
||||||
sha256 = "1ckaacc1z0j72llklrc4587ia6a0pab02bdyac6g3kl6kqvcz40c";
|
sha256 = "1ckaacc1z0j72llklrc4587ia6a0pab02bdyac6g3kl6kqvcz40c";
|
||||||
|
generation = "3_11";
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
{ stdenv, fetchurl, python, makeWrapper, gawk, bash, getopt, procps
|
{ stdenv, fetchurl, python, makeWrapper, gawk, bash, getopt, procps
|
||||||
, which, jre, version, sha256, coreutils, ...
|
, which, jre, coreutils, nixosTests
|
||||||
|
# generation is the attribute version suffix such as 3_11 in pkgs.cassandra_3_11
|
||||||
|
, generation
|
||||||
|
, version, sha256
|
||||||
|
, ...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
@ -83,6 +87,17 @@ stdenv.mkDerivation rec {
|
||||||
wrapProgram $out/bin/cqlsh --prefix PATH : ${python}/bin
|
wrapProgram $out/bin/cqlsh --prefix PATH : ${python}/bin
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
tests =
|
||||||
|
let
|
||||||
|
test = nixosTests."cassandra_${generation}";
|
||||||
|
in {
|
||||||
|
nixos =
|
||||||
|
assert test.testPackage.version == version;
|
||||||
|
test;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = "http://cassandra.apache.org/";
|
homepage = "http://cassandra.apache.org/";
|
||||||
description = "A massively scalable open source NoSQL database";
|
description = "A massively scalable open source NoSQL database";
|
||||||
|
|
Loading…
Reference in a new issue