Skip to content

Commit 82edd8b

Browse files
authored
Disable failing TLS 1.0/1.1 tests (#3130)
* Reverted changes to connection test matrix Tests were failing in main branch - CI environment only supports TLS 1.2 * Remove const from ConnectionTestParametersData
1 parent e652c5b commit 82edd8b

File tree

1 file changed

+5
-21
lines changed

1 file changed

+5
-21
lines changed

src/Microsoft.Data.SqlClient/tests/ManualTests/DataCommon/ConnectionTestParametersData.cs

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
using System.Collections.Generic;
66
using System.IO;
7-
using System.Security.Authentication;
87
using Microsoft.SqlServer.TDS.PreLogin;
98

109
namespace Microsoft.Data.SqlClient.ManualTesting.Tests.DataCommon
@@ -33,11 +32,11 @@ public ConnectionTestParametersData()
3332
// Test cases possible field values for connection parameters:
3433
// These combinations are based on the possible values of Encrypt, TrustServerCertificate, Certificate, HostNameInCertificate
3534
/*
36-
* TDSEncryption | Encrypt | TrustServerCertificate | Certificate | HNIC | SSL Protocols | TestResults
37-
* ---------------------------------------------------------------------------------------------------------------
38-
* Off | Optional | true | valid | valid name | TLS 1.2 | true
39-
* On | Mandatory | false | mismatched | empty | TLS 1.0, TLS 1.1 | false
40-
* Required | | x | ChainError? | wrong name? | |
35+
* TDSEncryption | Encrypt | TrustServerCertificate | Certificate | HNIC | TestResults
36+
* ----------------------------------------------------------------------------------------------
37+
* Off | Optional | true | valid | valid name | true
38+
* On | Mandatory | false | mismatched | empty | false
39+
* Required | | x | ChainError? | wrong name? |
4140
*/
4241
ConnectionTestParametersList = new List<ConnectionTestParameters>
4342
{
@@ -79,21 +78,6 @@ public ConnectionTestParametersData()
7978
new(TDSPreLoginTokenEncryptionType.On, SqlConnectionEncryptOption.Mandatory, true, s_mismatchedcert, _empty, true),
8079
new(TDSPreLoginTokenEncryptionType.Required, SqlConnectionEncryptOption.Mandatory, false, s_mismatchedcert, _empty, false),
8180
new(TDSPreLoginTokenEncryptionType.Required, SqlConnectionEncryptOption.Mandatory, true, s_mismatchedcert, _empty, true),
82-
83-
// Multiple SSL protocols test
84-
#pragma warning disable CA5397 // Do not use deprecated SslProtocols values
85-
#pragma warning disable CA5398 // Avoid hardcoded SslProtocols values
86-
#if NET
87-
#pragma warning disable SYSLIB0039 // Type or member is obsolete: TLS 1.0 & 1.1 are deprecated
88-
#endif
89-
new(TDSPreLoginTokenEncryptionType.Off, SqlConnectionEncryptOption.Mandatory, false, s_fullPathToCer, _empty, SslProtocols.Tls | SslProtocols.Tls11, true),
90-
new(TDSPreLoginTokenEncryptionType.On, SqlConnectionEncryptOption.Mandatory, false, s_fullPathToCer, _empty, SslProtocols.Tls | SslProtocols.Tls11, true),
91-
new(TDSPreLoginTokenEncryptionType.Required, SqlConnectionEncryptOption.Mandatory, false, s_fullPathToCer, _empty, SslProtocols.Tls | SslProtocols.Tls11, true),
92-
#if NET
93-
#pragma warning restore SYSLIB0039 // Type or member is obsolete: TLS 1.0 & 1.1 are deprecated
94-
#endif
95-
#pragma warning restore CA5397 // Do not use deprecated SslProtocols values
96-
#pragma warning restore CA5398 // Avoid hardcoded SslProtocols values
9781
};
9882
}
9983
}

0 commit comments

Comments
 (0)