File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 10
10
11
11
namespace SlackAPI . Tests
12
12
{
13
+ // Run UI tests on a single plateform to avoid Slack Captcha
14
+ // (captcha is displayed when trying to login too often)
15
+ #if NETFRAMEWORK
13
16
[ Collection ( "Integration tests" ) ]
14
17
public class UserUIInteraction
15
18
{
@@ -70,4 +73,5 @@ private AccessTokenResponse GetAccessToken(SlackClientHelpers slackClientHelpers
70
73
return accessTokenResponse ;
71
74
}
72
75
}
76
+ #endif
73
77
}
Original file line number Diff line number Diff line change @@ -14,6 +14,14 @@ public abstract class SlackClientBase
14
14
private readonly HttpClient httpClient ;
15
15
public string APIBaseLocation { get ; set ; } = "https://slack.com/api/" ;
16
16
17
+ static SlackClientBase ( )
18
+ {
19
+ #if ! NETSTANDARD1_3 && ! NETSTANDARD1_6
20
+ // Force Tls 1.2 for Slack
21
+ ServicePointManager . SecurityProtocol = SecurityProtocolType . Tls12 ;
22
+ #endif
23
+ }
24
+
17
25
protected SlackClientBase ( )
18
26
{
19
27
this . httpClient = new HttpClient ( ) ;
You can’t perform that action at this time.
0 commit comments