mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-17 02:51:45 -05:00
Load TrustServerCertificate value from connection settings when running integration tests. (#2074)
This commit is contained in:
@@ -66,6 +66,9 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.Common
|
|||||||
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
|
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
|
||||||
public string? HostNameInCertificate { get; set; }
|
public string? HostNameInCertificate { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
|
||||||
|
public string? TrustServerCertificate { get; set; }
|
||||||
|
|
||||||
public TestServerType ServerType { get; set; }
|
public TestServerType ServerType { get; set; }
|
||||||
|
|
||||||
public AuthenticationType AuthenticationType { get; set; }
|
public AuthenticationType AuthenticationType { get; set; }
|
||||||
|
|||||||
@@ -195,6 +195,12 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.Common
|
|||||||
connectParams.Connection.DatabaseName = databaseName;
|
connectParams.Connection.DatabaseName = databaseName;
|
||||||
connectParams.Connection.DatabaseDisplayName = databaseName;
|
connectParams.Connection.DatabaseDisplayName = databaseName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(connectionProfile.TrustServerCertificate))
|
||||||
|
{
|
||||||
|
connectParams.Connection.TrustServerCertificate = bool.Parse(connectionProfile.TrustServerCertificate);
|
||||||
|
}
|
||||||
|
|
||||||
if (key == SqlAzureInstanceKey || key == SqlAzureInstanceKey)
|
if (key == SqlAzureInstanceKey || key == SqlAzureInstanceKey)
|
||||||
{
|
{
|
||||||
connectParams.Connection.ConnectTimeout = 30;
|
connectParams.Connection.ConnectTimeout = 30;
|
||||||
|
|||||||
Reference in New Issue
Block a user