From 7924b37d1b67b854eb69f7b840bb3ba98dbd6ba0 Mon Sep 17 00:00:00 2001 From: Dusk Banks Date: Thu, 17 Oct 2024 23:15:47 -0700 Subject: [PATCH] tests/libstore-support: avoid host configuration setting a global like this is a hacky solution, but it works for now. without this, unit tests try to use configuration under `/etc/nix/`. Signed-off-by: Dusk Banks Change-Id: Ic7966a67d52646818991646439225a7af20f011c --- tests/unit/libstore-support/tests/libstore.hh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/unit/libstore-support/tests/libstore.hh b/tests/unit/libstore-support/tests/libstore.hh index ef93457b5..75093d3cd 100644 --- a/tests/unit/libstore-support/tests/libstore.hh +++ b/tests/unit/libstore-support/tests/libstore.hh @@ -4,6 +4,7 @@ #include #include +#include "globals.hh" #include "store-api.hh" namespace nix { @@ -11,6 +12,7 @@ namespace nix { class LibStoreTest : public ::testing::Test { public: static void SetUpTestSuite() { + settings.nixConfDir = "/dev/null"; // intentionally invalid path initLibStore(); }