aboutsummaryrefslogtreecommitdiff
path: root/tests/unit/libstore/machines.cc
diff options
context:
space:
mode:
authorrebecca “wiggles” turner <rbt@sent.as>2024-04-08 22:08:34 +0000
committerGerrit Code Review <gerrit@lix>2024-04-08 22:08:34 +0000
commit5ec256625e767add1d7cc9bc50b205f60ffb70a0 (patch)
treee3a12e11deac58d5a16dc9a68b35b698cdd0716d /tests/unit/libstore/machines.cc
parent3910d4aa680a0be3a2b99543ad48c8e0766c6b55 (diff)
parent12f2565f91a82ec3c99ee7a422f69efaf284353d (diff)
Merge "Don't run libstore unit tests in project root" into main
Diffstat (limited to 'tests/unit/libstore/machines.cc')
-rw-r--r--tests/unit/libstore/machines.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/unit/libstore/machines.cc b/tests/unit/libstore/machines.cc
index 702461926..0277237bb 100644
--- a/tests/unit/libstore/machines.cc
+++ b/tests/unit/libstore/machines.cc
@@ -1,5 +1,6 @@
#include "machines.hh"
#include "globals.hh"
+#include "tests/test-data.hh"
#include <gmock/gmock-matchers.h>
@@ -17,7 +18,6 @@ using nix::getMachines;
using nix::Machine;
using nix::Machines;
using nix::pathExists;
-using nix::Settings;
using nix::settings;
class Environment : public ::testing::Environment {
@@ -138,7 +138,7 @@ TEST(machines, getMachinesWithIncorrectFormat) {
}
TEST(machines, getMachinesWithCorrectFileReference) {
- auto path = absPath("tests/unit/libstore/test-data/machines.valid");
+ auto path = nix::getUnitTestDataPath("machines.valid");
ASSERT_TRUE(pathExists(path));
settings.builders = std::string("@") + path;
@@ -165,6 +165,6 @@ TEST(machines, getMachinesWithIncorrectFileReference) {
}
TEST(machines, getMachinesWithCorrectFileReferenceToIncorrectFile) {
- settings.builders = std::string("@") + absPath("tests/unit/libstore/test-data/machines.bad_format");
+ settings.builders = std::string("@") + nix::getUnitTestDataPath("machines.bad_format");
EXPECT_THROW(getMachines(), FormatError);
}