mirror of
https://github.com/NixOS/nix
synced 2025-06-25 02:21:16 +02:00
Motivation: See the linked issues for details. The most notable user-relevant bits are: - This cleans up the `MountedSSHStore`: decomposed into its orthogonal parts - This brings us pretty close to being able to then implement a JSON-based config. - Store query parameters can be JSON - Stores can entirely be specified via JSON objects, but this is not yet hooked up to anything. Also behind the scenes have these benefits: 1. The docs are moved out of the headers, good for less rebuilding when they changes 2. Stores are always constructed from store configs 3. Use JSON, avoid custom serializers Context: Part of #11106 Co-Authored-By: Robert Hensing <robert@roberthensing.nl> Co-authored-by: Sergei Zimmerman <145775305+xokdvium@users.noreply.github.com>
20 lines
394 B
C++
20 lines
394 B
C++
#include <gtest/gtest.h>
|
|
|
|
#include "nix/store/dummy-store.hh"
|
|
#include "nix/store/globals.hh"
|
|
|
|
namespace nix {
|
|
|
|
TEST(DummyStore, constructConfig)
|
|
{
|
|
DummyStoreConfig config{"dummy", "", {}};
|
|
|
|
EXPECT_EQ(config.storeDir, settings.nixStore);
|
|
}
|
|
|
|
TEST(DummyStore, constructConfigNoAuthority)
|
|
{
|
|
EXPECT_THROW(DummyStoreConfig("dummy", "not-allowed", {}), UsageError);
|
|
}
|
|
|
|
} // namespace nix
|