Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test | Fix managed instance TVP test source file #1878

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions BUILDGUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ public static class DataTestUtility
private static Dictionary<string, bool> 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;
Expand Down Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
{
Expand Down