protected override TestEnvironment GetTestEnvironmentFromContext()
{
TestEnvironment environment = null;
try
{
environment = base.GetOrgIdTestEnvironment(TestCSMOrgIdConnectionStringKey);
}
catch (ArgumentException exception)
{
// allow running gallery tests
TracingAdapter.Information("Node.exe was not found on the system, please install the x86 version of node.exe to run tests, received exception {0}", exception);
}
string galleryUri = Environment.GetEnvironmentVariable(TestCSMGalleryUri);
if (null == environment)
{
// we should be able to run gallery tests, even if credentials are not set up
environment = new TestEnvironment();
}
if (!string.IsNullOrEmpty(galleryUri))
{
environment.GalleryUri = new Uri(galleryUri);
}
else
{
environment.GalleryUri = new Uri(DefaultGalleryUri);
}
return environment;
}
}