test: pin pre-secrets artifact hash

This commit is contained in:
Joseph Doherty
2026-09-28 17:31:17 -04:00
parent 738e458755
commit 8aecd55db5
@@ -46,6 +46,23 @@ public class ArtifactRevisionHashServiceTests
SmtpConfigurations: null,
timestamp ?? DateTimeOffset.UtcNow);
[Fact]
public void ComputeHash_PreSecretsGoldenValue_IsUnchanged()
{
// Captured on HEAD 738e4587 — BEFORE Task 4 wired Secrets/MissingSecrets into the
// projection — using the fixed default baseline (one of each existing artifact
// kind) with a pinned deploymentId/timestamp. A command with Secrets == null and
// MissingSecrets == null must keep hashing to this exact value after Task 4, or a
// site with no secret references would spuriously flip to "out of date".
var golden = Command(
deploymentId: "golden",
timestamp: DateTimeOffset.Parse("2026-09-28T00:00:00Z"));
Assert.Equal(
"sha256:949f2c9c6d80432f94e9c2ad2a669b020a33c4a69653cf1b7b2b0aa217a467b0",
_sut.ComputeHash(golden));
}
[Fact]
public void ComputeHash_SameInputTwice_ProducesSameHash()
{