mirror of
https://github.com/NixOS/nix.git
synced 2025-11-21 01:39:36 +01:00
Merge pull request #14464 from lovesegfault/nix-s3-storage-class
feat(libstore): add S3 storage class support
This commit is contained in:
commit
533db37ebc
4 changed files with 65 additions and 2 deletions
|
|
@ -122,4 +122,22 @@ TEST(S3BinaryCacheStore, parameterFiltering)
|
|||
EXPECT_EQ(ref.params["priority"], "10");
|
||||
}
|
||||
|
||||
/**
|
||||
* Test storage class configuration
|
||||
*/
|
||||
TEST(S3BinaryCacheStore, storageClassDefault)
|
||||
{
|
||||
S3BinaryCacheStoreConfig config{"s3", "test-bucket", {}};
|
||||
EXPECT_EQ(config.storageClass.get(), std::nullopt);
|
||||
}
|
||||
|
||||
TEST(S3BinaryCacheStore, storageClassConfiguration)
|
||||
{
|
||||
StringMap params;
|
||||
params["storage-class"] = "GLACIER";
|
||||
|
||||
S3BinaryCacheStoreConfig config("s3", "test-bucket", params);
|
||||
EXPECT_EQ(config.storageClass.get(), std::optional<std::string>("GLACIER"));
|
||||
}
|
||||
|
||||
} // namespace nix
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue