Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 4 tests in SignatureTrustAndValidityVerificationProviderTests #3242

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -819,8 +819,7 @@ public async Task GetTrustResultAsync_PrimarySignatureWithUntrustedRoot_EmptyAll
var status = await provider.GetTrustResultAsync(packageReader, primarySignature, settings, CancellationToken.None);

Assert.Equal(SignatureVerificationStatus.Disallowed, status.Trust);
Assert.True(status.Issues.Where(i => i.Level == Common.LogLevel.Error)
.Any(i => i.Message.Contains(_untrustedChainCertError)));
SigningTestUtility.AssertUntrustedRoot(status.Issues, LogLevel.Error);
}
}

Expand Down Expand Up @@ -857,8 +856,7 @@ public async Task GetTrustResultAsync_RepositoryCountersignatureWithUntrustedRoo
var status = await provider.GetTrustResultAsync(packageReader, primarySignature, settings, CancellationToken.None);

Assert.Equal(SignatureVerificationStatus.Disallowed, status.Trust);
Assert.True(status.Issues.Where(i => i.Level == Common.LogLevel.Error)
.Any(i => i.Message.Contains(_untrustedChainCertError)));
SigningTestUtility.AssertUntrustedRoot(status.Issues, LogLevel.Error);
}
}

Expand Down Expand Up @@ -894,8 +892,7 @@ public async Task GetTrustResultAsync_PrimarySignatureWithUntrustedRoot_NotInAll
var status = await provider.GetTrustResultAsync(packageReader, primarySignature, settings, CancellationToken.None);

Assert.Equal(SignatureVerificationStatus.Disallowed, status.Trust);
Assert.True(status.Issues.Where(i => i.Level == Common.LogLevel.Error)
.Any(i => i.Message.Contains(_untrustedChainCertError)));
SigningTestUtility.AssertUntrustedRoot(status.Issues, LogLevel.Error);
}
}

Expand Down Expand Up @@ -933,8 +930,7 @@ public async Task GetTrustResultAsync_RepositoryCountersignatureWithUntrustedRoo
var status = await provider.GetTrustResultAsync(packageReader, primarySignature, settings, CancellationToken.None);

Assert.Equal(SignatureVerificationStatus.Disallowed, status.Trust);
Assert.True(status.Issues.Where(i => i.Level == Common.LogLevel.Error)
.Any(i => i.Message.Contains(_untrustedChainCertError)));
SigningTestUtility.AssertUntrustedRoot(status.Issues, LogLevel.Error);
}
}

Expand Down