1
1
Fork 0
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:
John Ericson 2025-11-10 22:54:12 +00:00 committed by GitHub
commit 533db37ebc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 65 additions and 2 deletions

View file

@ -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