mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-12-01 18:16:14 +02:00
22 lines
467 B
C++
22 lines
467 B
C++
|
#include <gtest/gtest.h>
|
||
|
|
||
|
#include "http-binary-cache-store.hh"
|
||
|
|
||
|
namespace nix {
|
||
|
|
||
|
TEST(HttpBinaryCacheStore, constructConfig)
|
||
|
{
|
||
|
HttpBinaryCacheStoreConfig config{"http", "foo.bar.baz", {}};
|
||
|
|
||
|
EXPECT_EQ(config.cacheUri, "http://foo.bar.baz");
|
||
|
}
|
||
|
|
||
|
TEST(HttpBinaryCacheStore, constructConfigNoTrailingSlash)
|
||
|
{
|
||
|
HttpBinaryCacheStoreConfig config{"https", "foo.bar.baz/a/b/", {}};
|
||
|
|
||
|
EXPECT_EQ(config.cacheUri, "https://foo.bar.baz/a/b");
|
||
|
}
|
||
|
|
||
|
} // namespace nix
|