diff --git a/BUILDGUIDE.md b/BUILDGUIDE.md index 390bdf4081..47cacc9fb7 100644 --- a/BUILDGUIDE.md +++ b/BUILDGUIDE.md @@ -187,6 +187,7 @@ Manual Tests require the below setup to run: |IsAzureSynpase | (Optional) When set to 'true', test suite runs compatible tests for Azure Synapse/Parallel Data Warehouse. | `true` OR `false`| |EnclaveAzureDatabaseConnString | (Optional) Connection string for Azure database with enclaves | |ManagedIdentitySupported | (Optional) When set to `false` **Managed Identity** related tests won't run. The default value is `true`. | + |IsManagedInstance | (Optional) When set to `true` **TVP** related tests will use on non-Azure bs files to compare test results. this is needed when testing against Managed Instances or TVP Tests will fail on Test set 3. The default value is `false`. | |PowerShellPath | The full path to PowerShell.exe. This is not required if the path is present in the PATH environment variable. | `D:\\escaped\\absolute\\path\\to\\PowerShell.exe` | ### Commands to run Manual Tests diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/DataCommon/DataTestUtility.cs b/src/Microsoft.Data.SqlClient/tests/ManualTests/DataCommon/DataTestUtility.cs index 2e274fc3c2..b6a7cff18f 100644 --- a/src/Microsoft.Data.SqlClient/tests/ManualTests/DataCommon/DataTestUtility.cs +++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/DataCommon/DataTestUtility.cs @@ -78,6 +78,8 @@ public static class DataTestUtility private static Dictionary AvailableDatabases; private static BaseEventListener TraceListener; + public static readonly bool IsManagedInstance = false; + //Kerberos variables public static readonly string KerberosDomainUser = null; internal static readonly string KerberosDomainPassword = null; @@ -114,6 +116,7 @@ static DataTestUtility() KerberosDomainPassword = c.KerberosDomainPassword; KerberosDomainUser = c.KerberosDomainUser; ManagedIdentitySupported = c.ManagedIdentitySupported; + IsManagedInstance = c.IsManagedInstance; System.Net.ServicePointManager.SecurityProtocol |= System.Net.SecurityProtocolType.Tls12; diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ParameterTest/TvpTest.cs b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ParameterTest/TvpTest.cs index 4c7f198793..7a13fdceb5 100644 --- a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ParameterTest/TvpTest.cs +++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ParameterTest/TvpTest.cs @@ -195,10 +195,25 @@ private void RunTest() private bool RunTestCoreAndCompareWithBaseline() { string outputPath = "SqlParameterTest.out"; + string baselinePath; #if DEBUG - string baselinePath = DataTestUtility.IsNotAzureServer() ? "SqlParameterTest_DebugMode.bsl" : "SqlParameterTest_DebugMode_Azure.bsl"; + if (DataTestUtility.IsNotAzureServer() || DataTestUtility.IsManagedInstance) + { + baselinePath = "SqlParameterTest_DebugMode.bsl"; + } + else + { + baselinePath = "SqlParameterTest_DebugMode_Azure.bsl"; + } #else - string baselinePath = DataTestUtility.IsNotAzureServer() ? "SqlParameterTest_ReleaseMode.bsl" : "SqlParameterTest_ReleaseMode_Azure.bsl"; + if (DataTestUtility.IsNotAzureServer() || DataTestUtility.IsManagedInstance) + { + baselinePath = "SqlParameterTest_ReleaseMode.bsl"; + } + else + { + baselinePath = "SqlParameterTest_ReleaseMode_Azure.bsl"; + } #endif var fstream = new FileStream(outputPath, FileMode.Create, FileAccess.Write, FileShare.Read); diff --git a/src/Microsoft.Data.SqlClient/tests/tools/Microsoft.Data.SqlClient.TestUtilities/Config.cs b/src/Microsoft.Data.SqlClient/tests/tools/Microsoft.Data.SqlClient.TestUtilities/Config.cs index 47eda61830..47aad75eec 100644 --- a/src/Microsoft.Data.SqlClient/tests/tools/Microsoft.Data.SqlClient.TestUtilities/Config.cs +++ b/src/Microsoft.Data.SqlClient/tests/tools/Microsoft.Data.SqlClient.TestUtilities/Config.cs @@ -43,6 +43,7 @@ public class Config public string PowerShellPath = null; public string KerberosDomainPassword = null; public string KerberosDomainUser = null; + public bool IsManagedInstance = false; public static Config Load(string configPath = @"config.json") {