about summary refs log tree commit diff
path: root/nixos/tests/aesmd.nix
diff options
context:
space:
mode:
authorVincent Haupert <mail@vincent-haupert.de>2022-11-29 16:25:11 +0100
committerVincent Haupert <mail@vincent-haupert.de>2022-12-04 20:12:50 +0100
commitdbff3c22c156de370cd8771688651becd62cab6b (patch)
tree55e18ea69309bd8ff8413d27352b677d212074ee /nixos/tests/aesmd.nix
parent4e937f0d6b8f5f5e34d2215a3d71620a8e89fa13 (diff)
nixos/aesmd: add option `environment`
Diffstat (limited to 'nixos/tests/aesmd.nix')
-rw-r--r--nixos/tests/aesmd.nix11
1 files changed, 10 insertions, 1 deletions
diff --git a/nixos/tests/aesmd.nix b/nixos/tests/aesmd.nix
index c1b7232bb24a6..848e1c5992014 100644
--- a/nixos/tests/aesmd.nix
+++ b/nixos/tests/aesmd.nix
@@ -28,7 +28,12 @@
 
     specialisation = {
       withQuoteProvider.configuration = { ... }: {
-        services.aesmd.quoteProviderLibrary = pkgs.sgx-azure-dcap-client;
+        services.aesmd = {
+          quoteProviderLibrary = pkgs.sgx-azure-dcap-client;
+          environment = {
+            AZDCAP_DEBUG_LOG_LEVEL = "INFO";
+          };
+        };
       };
     };
   };
@@ -89,5 +94,9 @@
         ld_library_path = machine.succeed(f"xargs -0 -L1 -a /proc/{main_pid}/environ | grep LD_LIBRARY_PATH")
         assert ld_library_path.startswith("LD_LIBRARY_PATH=${pkgs.sgx-azure-dcap-client}/lib:"), \
           "LD_LIBRARY_PATH is not set to the configured quote provider library"
+
+      with subtest("aesmd.service with quote provider library has set AZDCAP_DEBUG_LOG_LEVEL"):
+        azdcp_debug_log_level = machine.succeed(f"xargs -0 -L1 -a /proc/{main_pid}/environ | grep AZDCAP_DEBUG_LOG_LEVEL")
+        assert azdcp_debug_log_level == "AZDCAP_DEBUG_LOG_LEVEL=INFO\n", "AZDCAP_DEBUG_LOG_LEVEL is not set to INFO"
     '';
 }