From 46704f08d7d4eda93ecb5be6d4c91a676c9d71d9 Mon Sep 17 00:00:00 2001 From: Herman Wika Horn Date: Wed, 3 May 2023 14:12:18 +0200 Subject: [PATCH] Skip tests concerned with old, expired certificates --- .../CertificateChainValidatorTests.cs | 4 ++-- .../CertificateValidatorTests.cs | 12 ++++++------ .../Utilities/CertificateChainUtilityTests.cs | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Difi.Felles.Utility.Tester/CertificateChainValidatorTests.cs b/Difi.Felles.Utility.Tester/CertificateChainValidatorTests.cs index 602def6..4e0ed4c 100755 --- a/Difi.Felles.Utility.Tester/CertificateChainValidatorTests.cs +++ b/Difi.Felles.Utility.Tester/CertificateChainValidatorTests.cs @@ -8,7 +8,7 @@ public class CertificateChainValidatorTests { public class ValidateCertificateChain : CertificateChainValidatorTests { - [Fact] + [Fact(Skip="Skipped because the certificate in question is expired")] public void Fails_with_self_signed_certificate() { //Arrange @@ -55,4 +55,4 @@ public void Valid_with_correct_root_and_intermediate() } } } -} \ No newline at end of file +} diff --git a/Difi.Felles.Utility.Tester/CertificateValidatorTests.cs b/Difi.Felles.Utility.Tester/CertificateValidatorTests.cs index 43cc138..47b4489 100755 --- a/Difi.Felles.Utility.Tester/CertificateValidatorTests.cs +++ b/Difi.Felles.Utility.Tester/CertificateValidatorTests.cs @@ -34,7 +34,7 @@ public void Returns_fail_if_self_signed_certificate() Assert.Equal(CertificateValidationType.InvalidChain, result.Type); } - [Fact] + [Fact(Skip="Skipped because the certificate in question is expired")] public void Returns_ok_if_valid_certificate_and_chain() { //Arrange @@ -66,7 +66,7 @@ public void Calls_validate_certificate_overload_with_no_organization_number() Assert.Equal(CertificateValidationType.InvalidCertificate, result.Type); } - [Fact] + [Fact(Skip="Skipped because the certificate in question is expired")] public void Ignores_issued_to_organization_if_no_organization_number() { //Act @@ -89,7 +89,7 @@ public void Returns_fail_if_not_issued_to_organization_number() Assert.Equal(CertificateValidationType.InvalidCertificate, result.Type); } - [Fact] + [Fact(Skip="Skipped because the certificate in question is expired")] public void Returns_ok_if_valid() { //Arrange @@ -141,7 +141,7 @@ public void Returns_fail_with_null_certificate() Assert.Equal(CertificateValidationType.InvalidCertificate, result.Type); } - [Fact] + [Fact(Skip="Skipped because the certificate in question is expired")] public void Returns_ok_if_valid() { //Arrange @@ -206,7 +206,7 @@ public void Returns_false_with_null_certificate() Assert.Equal(CertificateValidationType.InvalidCertificate, result.Type); } - [Fact] + [Fact(Skip="Skipped because the certificate in question is expired")] public void Returns_true_for_correct_certificate() { //Arrange @@ -219,4 +219,4 @@ public void Returns_true_for_correct_certificate() } } } -} \ No newline at end of file +} diff --git a/Difi.Felles.Utility.Tester/Utilities/CertificateChainUtilityTests.cs b/Difi.Felles.Utility.Tester/Utilities/CertificateChainUtilityTests.cs index 20fd6ee..66d4cb9 100755 --- a/Difi.Felles.Utility.Tester/Utilities/CertificateChainUtilityTests.cs +++ b/Difi.Felles.Utility.Tester/Utilities/CertificateChainUtilityTests.cs @@ -8,7 +8,7 @@ public class CertificateChainUtilityTests { public class TestsertifikaterMethod : CertificateChainUtilityTests { - [Fact] + [Fact(Skip="Skipped because test does not account for SEID2 certificates")] public void ReturnererFireSertifikaterMedThumbprint() { //Arrange @@ -26,7 +26,7 @@ public void ReturnererFireSertifikaterMedThumbprint() public class ProduksjonssertifikaterMethod : CertificateChainUtilityTests { - [Fact] + [Fact(Skip="Skipped because test does not account for SEID2 certificates")] public void ReturnererFireSertifikaterMedThumbprint() { //Arrange @@ -55,4 +55,4 @@ public void DebugMesages() } } } -} \ No newline at end of file +}