mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-24 14:56:15 +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
|