only dynamic derivations could produce a non-opaque drvPath. since dynamic derivations are no longer supported we can have drvPath be opaque at all times, simplifying downstream code significantly and making quite a few methods unnecessary. discardOutputPath was only called on drvPath members anyway and thus reduces to a copy, other operations at the very least are no longer recursive. some vestige of dynamic derivations remains in DerivedPathMap though (for now). Change-Id: Ifb4ad53a3c67800be5a62540068c8279d4ae0046
24 lines
681 B
C++
24 lines
681 B
C++
#include <gtest/gtest.h>
|
|
|
|
#include "lix/libstore/downstream-placeholder.hh"
|
|
|
|
namespace nix {
|
|
|
|
TEST(DownstreamPlaceholder, unknownCaOutput) {
|
|
/**
|
|
* We set these in tests rather than the regular globals so we don't have
|
|
* to worry about race conditions if the tests run concurrently.
|
|
*/
|
|
ExperimentalFeatureSettings mockXpSettings;
|
|
mockXpSettings.set("experimental-features", "ca-derivations");
|
|
|
|
ASSERT_EQ(
|
|
DownstreamPlaceholder::unknownCaOutput(
|
|
StorePath { "g1w7hy3qg1w7hy3qg1w7hy3qg1w7hy3q-foo.drv" },
|
|
"out",
|
|
mockXpSettings).render(),
|
|
"/0c6rn30q4frawknapgwq386zq358m8r6msvywcvc89n6m5p2dgbz");
|
|
}
|
|
|
|
}
|