Add S3 retention policy

This commit is contained in:
Caelan Sayler
2024-01-24 11:22:00 +00:00
parent 8aab325cd1
commit 287057c18f
4 changed files with 38 additions and 2 deletions

View File

@@ -58,6 +58,7 @@ namespace Velopack.Packaging.Tests
Endpoint = "https://" + B2_ENDPOINT,
KeyId = B2_KEYID,
Secret = B2_SECRET,
KeepMaxReleases = 4,
};
// download latest version and create delta
@@ -80,6 +81,7 @@ namespace Velopack.Packaging.Tests
Assert.True(latest != null, "No latest version found.");
Assert.Equal(newVer, latest.Version);
Assert.True(feed.Assets.Count(x => x.Type == VelopackAssetType.Full) <= options.KeepMaxReleases, "Too many releases were kept.");
}
}
}