about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorajs124 <ajs124@users.noreply.github.com>2021-05-07 18:55:49 +0200
committerGitHub <noreply@github.com>2021-05-07 18:55:49 +0200
commitcd609e7a1c48e324c1779a6845ef0f7e6face24e (patch)
tree2e75beab144651f7573549af51dc779436143bf9 /nixos
parent5186e965ffa51af67be9993c96040b140e40781f (diff)
parent09d29bd784d05ef2ae69df150a6cb4306133a017 (diff)
downloadnixlib-cd609e7a1c48e324c1779a6845ef0f7e6face24e.tar
nixlib-cd609e7a1c48e324c1779a6845ef0f7e6face24e.tar.gz
nixlib-cd609e7a1c48e324c1779a6845ef0f7e6face24e.tar.bz2
nixlib-cd609e7a1c48e324c1779a6845ef0f7e6face24e.tar.lz
nixlib-cd609e7a1c48e324c1779a6845ef0f7e6face24e.tar.xz
nixlib-cd609e7a1c48e324c1779a6845ef0f7e6face24e.tar.zst
nixlib-cd609e7a1c48e324c1779a6845ef0f7e6face24e.zip
Merge pull request #117094 from helsinki-systems/drop/spidermonkey_1_8_5
spidermonkey_1_8_5: drop
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/databases/couchdb.nix19
-rw-r--r--nixos/tests/couchdb.nix38
2 files changed, 5 insertions, 52 deletions
diff --git a/nixos/modules/services/databases/couchdb.nix b/nixos/modules/services/databases/couchdb.nix
index c99a7529213d..6cc29cd717ec 100644
--- a/nixos/modules/services/databases/couchdb.nix
+++ b/nixos/modules/services/databases/couchdb.nix
@@ -4,24 +4,17 @@ with lib;
 
 let
   cfg = config.services.couchdb;
-  useVersion2 = strings.versionAtLeast (strings.getVersion cfg.package) "2.0";
   configFile = pkgs.writeText "couchdb.ini" (
     ''
       [couchdb]
       database_dir = ${cfg.databaseDir}
       uri_file = ${cfg.uriFile}
       view_index_dir = ${cfg.viewIndexDir}
-    '' + (if cfg.adminPass != null then
-    ''
+    '' + (optionalString (cfg.adminPass != null) ''
       [admins]
       ${cfg.adminUser} = ${cfg.adminPass}
-    '' else
-    "") + (if useVersion2 then
-    ''
+    '' + ''
       [chttpd]
-    '' else
-    ''
-      [httpd]
     '') +
     ''
       port = ${toString cfg.port}
@@ -30,8 +23,7 @@ let
       [log]
       file = ${cfg.logFile}
     '');
-  executable = if useVersion2 then "${cfg.package}/bin/couchdb"
-    else ''${cfg.package}/bin/couchdb -a ${configFile} -a ${pkgs.writeText "couchdb-extra.ini" cfg.extraConfig} -a ${cfg.configFile}'';
+  executable = "${cfg.package}/bin/couchdb";
 
 in {
 
@@ -177,8 +169,7 @@ in {
 
     environment.systemPackages = [ cfg.package ];
 
-    services.couchdb.configFile = mkDefault
-      (if useVersion2 then "/var/lib/couchdb/local.ini" else "/var/lib/couchdb/couchdb.ini");
+    services.couchdb.configFile = mkDefault "/var/lib/couchdb/local.ini";
 
     systemd.tmpfiles.rules = [
       "d '${dirOf cfg.uriFile}' - ${cfg.user} ${cfg.group} - -"
@@ -195,7 +186,7 @@ in {
         touch ${cfg.configFile}
       '';
 
-      environment = mkIf useVersion2 {
+      environment = {
         # we are actually specifying 4 configuration files:
         # 1. the preinstalled default.ini
         # 2. the module configuration
diff --git a/nixos/tests/couchdb.nix b/nixos/tests/couchdb.nix
index d038ee7d890d..049532481b15 100644
--- a/nixos/tests/couchdb.nix
+++ b/nixos/tests/couchdb.nix
@@ -24,8 +24,6 @@ with lib;
   };
 
   nodes = {
-    couchdb1 = makeNode pkgs.couchdb testuser testpass;
-    couchdb2 = makeNode pkgs.couchdb2 testuser testpass;
     couchdb3 = makeNode pkgs.couchdb3 testuser testpass;
   };
 
@@ -41,42 +39,6 @@ with lib;
   in ''
     start_all()
 
-    couchdb1.wait_for_unit("couchdb.service")
-    couchdb1.wait_until_succeeds(
-        "${curlJqCheck "" "GET" "" ".couchdb" "Welcome"}"
-    )
-    couchdb1.wait_until_succeeds(
-        "${curlJqCheck "" "GET" "_all_dbs" ". | length" "2"}"
-    )
-    couchdb1.succeed("${curlJqCheck testlogin "PUT" "foo" ".ok" "true"}")
-    couchdb1.succeed(
-        "${curlJqCheck "" "GET" "_all_dbs" ". | length" "3"}"
-    )
-    couchdb1.succeed(
-        "${curlJqCheck testlogin "DELETE" "foo" ".ok" "true"}"
-    )
-    couchdb1.succeed(
-        "${curlJqCheck "" "GET" "_all_dbs" ". | length" "2"}"
-    )
-
-    couchdb2.wait_for_unit("couchdb.service")
-    couchdb2.wait_until_succeeds(
-        "${curlJqCheck "" "GET" "" ".couchdb" "Welcome"}"
-    )
-    couchdb2.wait_until_succeeds(
-        "${curlJqCheck "" "GET" "_all_dbs" ". | length" "0"}"
-    )
-    couchdb2.succeed("${curlJqCheck testlogin "PUT" "foo" ".ok" "true"}")
-    couchdb2.succeed(
-        "${curlJqCheck "" "GET" "_all_dbs" ". | length" "1"}"
-    )
-    couchdb2.succeed(
-        "${curlJqCheck testlogin "DELETE" "foo" ".ok" "true"}"
-    )
-    couchdb2.succeed(
-        "${curlJqCheck "" "GET" "_all_dbs" ". | length" "0"}"
-    )
-
     couchdb3.wait_for_unit("couchdb.service")
     couchdb3.wait_until_succeeds(
         "${curlJqCheck testlogin "GET" "" ".couchdb" "Welcome"}"