summary refs log tree commit diff
path: root/nixos/tests/hadoop/hdfs.nix
diff options
context:
space:
mode:
authorAnderson Torres <torres.anderson.85@protonmail.com>2023-04-30 11:26:16 -0300
committerAnderson Torres <torres.anderson.85@protonmail.com>2023-05-12 22:29:27 -0300
commit9bdb3ee1755f2da2f410712147d18520a61b8133 (patch)
tree45729a7566f4604da4aa38824819d35d2b1ff957 /nixos/tests/hadoop/hdfs.nix
parent49483ab7689dd20013a75dbd01d7e681faaf8747 (diff)
downloadnixpkgs-9bdb3ee1755f2da2f410712147d18520a61b8133.tar
nixpkgs-9bdb3ee1755f2da2f410712147d18520a61b8133.tar.gz
nixpkgs-9bdb3ee1755f2da2f410712147d18520a61b8133.tar.bz2
nixpkgs-9bdb3ee1755f2da2f410712147d18520a61b8133.tar.lz
nixpkgs-9bdb3ee1755f2da2f410712147d18520a61b8133.tar.xz
nixpkgs-9bdb3ee1755f2da2f410712147d18520a61b8133.tar.zst
nixpkgs-9bdb3ee1755f2da2f410712147d18520a61b8133.zip
nixos/tests/hadoop/hdfs.nix: get rid of `with lib`
Diffstat (limited to 'nixos/tests/hadoop/hdfs.nix')
-rw-r--r--nixos/tests/hadoop/hdfs.nix7
1 files changed, 3 insertions, 4 deletions
diff --git a/nixos/tests/hadoop/hdfs.nix b/nixos/tests/hadoop/hdfs.nix
index 9415500463d..429d4bf6b53 100644
--- a/nixos/tests/hadoop/hdfs.nix
+++ b/nixos/tests/hadoop/hdfs.nix
@@ -1,6 +1,5 @@
 # Test a minimal HDFS cluster with no HA
 import ../make-test-python.nix ({ package, lib, ... }:
-with lib;
 {
   name = "hadoop-hdfs";
 
@@ -22,7 +21,7 @@ with lib;
           };
           httpfs = {
             # The NixOS hadoop module only support webHDFS on 3.3 and newer
-            enable = mkIf (versionAtLeast package.version "3.3") true;
+            enable = lib.mkIf (lib.versionAtLeast package.version "3.3") true;
             openFirewall = true;
           };
         };
@@ -57,7 +56,7 @@ with lib;
 
     datanode.wait_for_unit("hdfs-datanode")
     datanode.wait_for_unit("network.target")
-  '' + ( if versionAtLeast package.version "3" then ''
+  '' + (if lib.versionAtLeast package.version "3" then ''
     datanode.wait_for_open_port(9864)
     datanode.wait_for_open_port(9866)
     datanode.wait_for_open_port(9867)
@@ -76,7 +75,7 @@ with lib;
     datanode.succeed("echo testfilecontents | sudo -u hdfs hdfs dfs -put - /testfile")
     assert "testfilecontents" in datanode.succeed("sudo -u hdfs hdfs dfs -cat /testfile")
 
-  '' + optionalString ( versionAtLeast package.version "3.3" ) ''
+  '' + lib.optionalString (lib.versionAtLeast package.version "3.3" ) ''
     namenode.wait_for_unit("hdfs-httpfs")
     namenode.wait_for_open_port(14000)
     assert "testfilecontents" in datanode.succeed("curl -f \"http://namenode:14000/webhdfs/v1/testfile?user.name=hdfs&op=OPEN\" 2>&1")