File tree Expand file tree Collapse file tree 2 files changed +18
-6
lines changed
src/QAToolKit.Engine.Bombardier.Test Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -23,9 +23,7 @@ public BombardierTestsRunnerTests(ITestOutputHelper testOutputHelper)
2323 _logger = loggerFactory . CreateLogger < BombardierTestsRunnerTests > ( ) ;
2424 }
2525
26- #if DEBUG
27- [ Fact ]
28- #endif
26+ [ IgnoreOnGithubFact ]
2927 public async Task BombardierGetTestWithOptionsTest_Successfull ( )
3028 {
3129
@@ -69,9 +67,7 @@ public async Task BombardierGetTestWithOptionsTest_Successfull()
6967 Assert . True ( bombardierResults . FirstOrDefault ( ) . TestStop . Subtract ( bombardierResults . FirstOrDefault ( ) . TestStart ) . TotalSeconds == bombardierResults . FirstOrDefault ( ) . Duration ) ;
7068 }
7169
72- #if DEBUG
73- [ Fact ]
74- #endif
70+ [ IgnoreOnGithubFact ]
7571 public async Task BombardierPostTestWithOptionsTest_Successfull ( )
7672 {
7773
Original file line number Diff line number Diff line change 1+ using System ;
2+ using Xunit ;
3+
4+ public sealed class IgnoreOnGithubFact : FactAttribute
5+ {
6+ public IgnoreOnGithubFact ( )
7+ {
8+ if ( IsGitHubAction ( ) )
9+ {
10+ Skip = "Ignore the test when run in Github agent." ;
11+ }
12+ }
13+
14+ private static bool IsGitHubAction ( )
15+ => Environment . GetEnvironmentVariable ( "GITHUB_ACTION" ) != null ;
16+ }
You can’t perform that action at this time.
0 commit comments