File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
test/LettuceEncrypt.UnitTests Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 1+ // Copyright (c) Nate McMaster.
2+ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3+
4+ using System . Runtime . InteropServices ;
5+ using McMaster . Extensions . Xunit ;
6+
7+ namespace LettuceEncrypt . UnitTests ;
8+
9+ [ AttributeUsage ( AttributeTargets . Method , AllowMultiple = false ) ]
10+ internal class SkipOnMacOSCIBuildAttribute : Attribute , ITestCondition
11+ {
12+ public bool IsMet => string . IsNullOrEmpty ( Environment . GetEnvironmentVariable ( "CI" ) )
13+ || ! RuntimeInformation . IsOSPlatform ( OSPlatform . OSX ) ;
14+
15+ public string SkipReason { get ; set ; }
16+ }
Original file line number Diff line number Diff line change @@ -64,6 +64,8 @@ public async Task ItFindsCertByCommonNameAsync()
6464 [ SkippableFact ]
6565 [ SkipOnWindowsCIBuild ( SkipReason =
6666 "On Windows in CI, adding certs to store doesn't work for unclear reasons." ) ]
67+ [ SkipOnMacOSCIBuild ( SkipReason =
68+ "On macOS in CI, adding certs to the keychain fails with 'The specified item could not be found in the keychain'." ) ]
6769 public async Task ItSavesCertificates ( )
6870 {
6971 var commonName = "x509store.save.test.natemcmaster.com" ;
You can’t perform that action at this time.
0 commit comments