Skip to content

Commit

Permalink
Merge pull request #106477 from hercules-ci/cassandra-backports
Browse files Browse the repository at this point in the history
[20.09] cassandra backports
  • Loading branch information
roberth committed Dec 10, 2020
2 parents 3446523 + eb6b46c commit 1fb6969
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 13 deletions.
6 changes: 5 additions & 1 deletion nixos/tests/all-tests.nix
Expand Up @@ -44,7 +44,11 @@ in
caddy = handleTest ./caddy.nix {};
cadvisor = handleTestOn ["x86_64-linux"] ./cadvisor.nix {};
cage = handleTest ./cage.nix {};
cassandra = handleTest ./cassandra.nix {};
cagebreak = handleTest ./cagebreak.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-single-node = handleTestOn ["x86_64-linux"] ./ceph-single-node.nix {};
ceph-multi-node = handleTestOn ["x86_64-linux"] ./ceph-multi-node.nix {};
certmgr = handleTest ./certmgr.nix {};
Expand Down
10 changes: 6 additions & 4 deletions 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";
Expand Down Expand Up @@ -47,7 +45,7 @@ let
};
in
{
name = "cassandra";
name = "cassandra-${testPackage.version}";
meta = {
maintainers = with lib.maintainers; [ johnazoidberg ];
};
Expand Down Expand Up @@ -128,4 +126,8 @@ in
"nodetool status -p ${jmxPortStr} --resolve-ip | egrep '^UN[[:space:]]+cass2'"
)
'';

passthru = {
inherit testPackage;
};
})
5 changes: 3 additions & 2 deletions pkgs/servers/nosql/cassandra/2.1.nix
@@ -1,6 +1,7 @@
{ callPackage, ... } @ args:

callPackage ./generic.nix (args // {
version = "2.1.20";
sha256 = "0ik7a4jg3s3xnyrj1sa0rvbh066fv1y2202l7cv6nbca72pgyl6a";
version = "2.1.22";
sha256 = "1wk57dz0kmc6d5y8d8dkx269lzh3ark3751z734gxncwdlclcyz3";
generation = "2_1";
})
1 change: 1 addition & 0 deletions pkgs/servers/nosql/cassandra/2.2.nix
Expand Up @@ -3,4 +3,5 @@
callPackage ./generic.nix (args // {
version = "2.2.14";
sha256 = "1b2x3q1ach44qg07sh8wr7d8a10n36w5522drd3p35djbiwa3d9q";
generation = "2_2";
})
5 changes: 3 additions & 2 deletions pkgs/servers/nosql/cassandra/3.0.nix
@@ -1,6 +1,7 @@
{ callPackage, ... } @ args:

callPackage ./generic.nix (args // {
version = "3.0.17";
sha256 = "0568r5xdy78pl29zby5g4m9qngf29cb9222sc1q1wisapb7zkl2p";
version = "3.0.23";
sha256 = "0cbia20bggq85q2p6gsybw045qdfqxd5xv8ihppq1hwl21sb2klz";
generation = "3_0";
})
5 changes: 3 additions & 2 deletions pkgs/servers/nosql/cassandra/3.11.nix
@@ -1,6 +1,7 @@
{ callPackage, ... } @ args:

callPackage ./generic.nix (args // {
version = "3.11.4";
sha256 = "11wr0vcps8w8g2sd8qwp1yp8y873c4q32azc041xpi7zqciqwnax";
version = "3.11.9";
sha256 = "1ckaacc1z0j72llklrc4587ia6a0pab02bdyac6g3kl6kqvcz40c";
generation = "3_11";
})
17 changes: 15 additions & 2 deletions pkgs/servers/nosql/cassandra/generic.nix
@@ -1,5 +1,9 @@
{ 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
Expand Down Expand Up @@ -83,11 +87,20 @@ stdenv.mkDerivation rec {
wrapProgram $out/bin/cqlsh --prefix PATH : ${python}/bin
'';

passthru = {
tests =
let
test = nixosTests."cassandra_${generation}";
in {
nixos = test;
};
};

meta = with stdenv.lib; {
homepage = "http://cassandra.apache.org/";
description = "A massively scalable open source NoSQL database";
platforms = platforms.unix;
license = licenses.asl20;
maintainers = with maintainers; [ cransom ];
maintainers = [];
};
}

0 comments on commit 1fb6969

Please sign in to comment.