Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
300 additions
and
361 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import ./make-test.nix ({ pkgs, lib, ...}: | ||
|
||
with lib; | ||
|
||
{ | ||
name = "couchdb"; | ||
meta = with pkgs.stdenv.lib.maintainers; { | ||
maintainers = [ fpletz ]; | ||
}; | ||
|
||
nodes = { | ||
couchdb1 = | ||
{ pkgs, config, ... }: | ||
|
||
{ environment.systemPackages = with pkgs; [ jq ]; | ||
services.couchdb.enable = true; | ||
}; | ||
|
||
couchdb2 = | ||
{ pkgs, config, ... }: | ||
|
||
{ environment.systemPackages = with pkgs; [ jq ]; | ||
services.couchdb.enable = true; | ||
services.couchdb.package = pkgs.couchdb2; | ||
}; | ||
}; | ||
|
||
testScript = let | ||
curlJqCheck = action: path: jqexpr: result: | ||
pkgs.writeScript "curl-jq-check-${action}-${path}.sh" '' | ||
RESULT=$(curl -X ${action} http://127.0.0.1:5984/${path} | jq -r '${jqexpr}') | ||
echo $RESULT >&2 | ||
if [ "$RESULT" != "${result}" ]; then | ||
exit 1 | ||
fi | ||
''; | ||
in '' | ||
startAll; | ||
$couchdb1->waitForUnit("couchdb.service"); | ||
$couchdb1->waitUntilSucceeds("${curlJqCheck "GET" "" ".couchdb" "Welcome"}"); | ||
$couchdb1->waitUntilSucceeds("${curlJqCheck "GET" "_all_dbs" ". | length" "2"}"); | ||
$couchdb1->succeed("${curlJqCheck "PUT" "foo" ".ok" "true"}"); | ||
$couchdb1->succeed("${curlJqCheck "GET" "_all_dbs" ". | length" "3"}"); | ||
$couchdb1->succeed("${curlJqCheck "DELETE" "foo" ".ok" "true"}"); | ||
$couchdb1->succeed("${curlJqCheck "GET" "_all_dbs" ". | length" "2"}"); | ||
$couchdb2->waitForUnit("couchdb.service"); | ||
$couchdb2->waitUntilSucceeds("${curlJqCheck "GET" "" ".couchdb" "Welcome"}"); | ||
$couchdb2->waitUntilSucceeds("${curlJqCheck "GET" "_all_dbs" ". | length" "0"}"); | ||
$couchdb2->succeed("${curlJqCheck "PUT" "foo" ".ok" "true"}"); | ||
$couchdb2->succeed("${curlJqCheck "GET" "_all_dbs" ". | length" "1"}"); | ||
$couchdb2->succeed("${curlJqCheck "DELETE" "foo" ".ok" "true"}"); | ||
$couchdb2->succeed("${curlJqCheck "GET" "_all_dbs" ". | length" "0"}"); | ||
''; | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,8 @@ | ||
{ callPackage, fetchpatch, ... } @ args: | ||
|
||
callPackage ./generic.nix (args // rec { | ||
version = "2.1.2"; | ||
branch = "2.1"; | ||
revision = "v2.1.2"; | ||
sha256 = "0kdcl9sqjz0vagli4ad6bxq1r8ma086m0prpkm5x3dxp37hpjp8h"; | ||
|
||
patches = [ | ||
# Fetched from https://github.com/szukw000/openjpeg/commit/cadff5fb6e73398de26a92e96d3d7cac893af255 | ||
# Referenced from https://bugzilla.redhat.com/show_bug.cgi?id=1405135 | ||
# Put in our source code to make sure we don't lose it, since that | ||
# referenced commit is someone else's fork, and not actually up-stream. | ||
./CVE-2016-9580-and-CVE-2016-9581.patch | ||
|
||
(fetchpatch { | ||
url = "https://bugzilla.suse.com/attachment.cgi?id=707359&action=diff&context=patch&collapsed=&headers=1&format=raw"; | ||
name = "CVE-2016-9112.patch"; | ||
sha256 = "18hqx73wdzfybr5n5k6pzhbhdlmawiqbjci8n82zykxiyfgp18pd"; | ||
}) | ||
(fetchpatch { | ||
url = "https://bugzilla.suse.com/attachment.cgi?id=707354&action=diff&context=patch&collapsed=&headers=1&format=raw"; | ||
name = "CVE-2016-9114.patch"; | ||
sha256 = "0qam3arw9kdbh4501xim2pyldl708dnpyjwvjmwc9gc7hcq4gfi3"; | ||
}) | ||
(fetchpatch { | ||
url = "https://bugzilla.suse.com/attachment.cgi?id=707356&action=diff&context=patch&collapsed=&headers=1&format=raw"; | ||
name = "CVE-2016-9116.patch"; | ||
sha256 = "0yyb3pxqi5sr44a48bacngzp206j4z49lzkg6hbkz1nra9na61a3"; | ||
}) | ||
(fetchpatch { | ||
url = "https://bugzilla.suse.com/attachment.cgi?id=707358&action=diff&context=patch&collapsed=&headers=1&format=raw"; | ||
name = "CVE-2016-9118.patch"; | ||
sha256 = "125n8bmh07y7697s0y82ypb39rxgj0bdn8rcywbvamscagwg2wy9"; | ||
}) | ||
]; | ||
version = "2.3.0"; | ||
branch = "2.3"; | ||
revision = "v${version}"; | ||
sha256 = "08plxrnfl33sn2vh5nwbsngyv6b1sfpplvx881crm1v1ai10m2lz"; | ||
}) |
Oops, something went wrong.