nixos/couchdb: port test to python
This commit is contained in:
parent
bf816e44c4
commit
dd188ae2dc
|
@ -1,4 +1,4 @@
|
||||||
import ./make-test.nix ({ pkgs, lib, ...}:
|
import ./make-test-python.nix ({ pkgs, lib, ...}:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
@ -35,22 +35,42 @@ with lib;
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
in ''
|
in ''
|
||||||
startAll;
|
start_all()
|
||||||
|
|
||||||
$couchdb1->waitForUnit("couchdb.service");
|
couchdb1.wait_for_unit("couchdb.service")
|
||||||
$couchdb1->waitUntilSucceeds("${curlJqCheck "GET" "" ".couchdb" "Welcome"}");
|
couchdb1.wait_until_succeeds(
|
||||||
$couchdb1->waitUntilSucceeds("${curlJqCheck "GET" "_all_dbs" ". | length" "2"}");
|
"${curlJqCheck "GET" "" ".couchdb" "Welcome"}"
|
||||||
$couchdb1->succeed("${curlJqCheck "PUT" "foo" ".ok" "true"}");
|
)
|
||||||
$couchdb1->succeed("${curlJqCheck "GET" "_all_dbs" ". | length" "3"}");
|
couchdb1.wait_until_succeeds(
|
||||||
$couchdb1->succeed("${curlJqCheck "DELETE" "foo" ".ok" "true"}");
|
"${curlJqCheck "GET" "_all_dbs" ". | length" "2"}"
|
||||||
$couchdb1->succeed("${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.wait_for_unit("couchdb.service")
|
||||||
$couchdb2->waitUntilSucceeds("${curlJqCheck "GET" "" ".couchdb" "Welcome"}");
|
couchdb2.wait_until_succeeds(
|
||||||
$couchdb2->waitUntilSucceeds("${curlJqCheck "GET" "_all_dbs" ". | length" "0"}");
|
"${curlJqCheck "GET" "" ".couchdb" "Welcome"}"
|
||||||
$couchdb2->succeed("${curlJqCheck "PUT" "foo" ".ok" "true"}");
|
)
|
||||||
$couchdb2->succeed("${curlJqCheck "GET" "_all_dbs" ". | length" "1"}");
|
couchdb2.wait_until_succeeds(
|
||||||
$couchdb2->succeed("${curlJqCheck "DELETE" "foo" ".ok" "true"}");
|
"${curlJqCheck "GET" "_all_dbs" ". | length" "0"}"
|
||||||
$couchdb2->succeed("${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"}"
|
||||||
|
)
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue