libstore-support: check that we can create the store

This commit is contained in:
Jörg Thalheim 2024-09-17 18:46:50 +02:00
parent 95f2b2beab
commit 98db531df2

View File

@ -61,6 +61,10 @@ protected:
const char ** params[] = {p1, p2, p3, nullptr};
store = nix_store_open(ctx, "local", params);
if (!store) {
std::string errMsg = nix_err_msg(nullptr, ctx, nullptr);
ASSERT_NE(store, nullptr) << "Could not open store: " << errMsg;
};
}
};
}