diff --git a/src/TriggerService.Tests/CromwellOnAzureEnvironmentTests.cs b/src/TriggerService.Tests/CromwellOnAzureEnvironmentTests.cs index d30476d4..642a39af 100644 --- a/src/TriggerService.Tests/CromwellOnAzureEnvironmentTests.cs +++ b/src/TriggerService.Tests/CromwellOnAzureEnvironmentTests.cs @@ -19,7 +19,6 @@ namespace TriggerService.Tests { [TestClass] - [Ignore] public class CromwellOnAzureEnvironmentTests { private const string azureName = "test"; @@ -160,8 +159,7 @@ private TriggerHostedService SetCromwellOnAzureEnvironment(string accountAuthori ApplicationInsightsAccountName = "fakeappinsights" }); - var azureCloudConfig = AzureCloudConfig.FromKnownCloudNameAsync().Result; - var environment = new TriggerHostedService(logger, triggerServiceOptions.Object, cromwellApiClient, repository, storageUtility.Object, azureCloudConfig); + var environment = new TriggerHostedService(logger, triggerServiceOptions.Object, cromwellApiClient, repository, storageUtility.Object, AzureCloudConfig.ForUnitTesting()); return environment; } diff --git a/src/TriggerService.Tests/ProcessAbortRequestTests.cs b/src/TriggerService.Tests/ProcessAbortRequestTests.cs index ea2f422b..c5c100f4 100644 --- a/src/TriggerService.Tests/ProcessAbortRequestTests.cs +++ b/src/TriggerService.Tests/ProcessAbortRequestTests.cs @@ -19,7 +19,6 @@ namespace TriggerService.Tests { [TestClass] - [Ignore] public class ProcessAbortRequestTests { public ProcessAbortRequestTests() @@ -103,8 +102,7 @@ public async Task FailedAbortRequestFileGetsMovedToFailedSubdirectory() .Setup(x => x.GetStorageAccountsUsingMsiAsync(It.IsAny())) .Returns(Task.FromResult((new List(), azureStorage.Object))); - var azureCloudConfig = AzureCloudConfig.FromKnownCloudNameAsync().Result; - var cromwellOnAzureEnvironment = new TriggerHostedService(logger, triggerServiceOptions.Object, cromwellApiClient, repository.Object, storageUtility.Object, azureCloudConfig); + var cromwellOnAzureEnvironment = new TriggerHostedService(logger, triggerServiceOptions.Object, cromwellApiClient, repository.Object, storageUtility.Object, AzureCloudConfig.ForUnitTesting()); await cromwellOnAzureEnvironment.ProcessAndAbortWorkflowsAsync(); return (newTriggerName, newTriggerContent); } diff --git a/src/TriggerService.Tests/ProcessNewWorkflowTests.cs b/src/TriggerService.Tests/ProcessNewWorkflowTests.cs index c720cd85..c6bed09d 100644 --- a/src/TriggerService.Tests/ProcessNewWorkflowTests.cs +++ b/src/TriggerService.Tests/ProcessNewWorkflowTests.cs @@ -20,7 +20,6 @@ namespace TriggerService.Tests { [TestClass] - [Ignore] public class ProcessNewWorkflowTests { public ProcessNewWorkflowTests() @@ -121,14 +120,13 @@ public async Task NewWorkflowsThatFailToPostToCromwellAreMovedToFailedSubdirecto storageUtility .Setup(x => x.GetStorageAccountsUsingMsiAsync(It.IsAny())) .Returns(Task.FromResult((new List(), azureStorage.Object))); - var azureCloudConfig = AzureCloudConfig.FromKnownCloudNameAsync().Result; var cromwellOnAzureEnvironment = new TriggerHostedService( logger, optionsMock.Object, cromwellApiClient, tesTaskRepository, storageUtility.Object, - azureCloudConfig); + AzureCloudConfig.ForUnitTesting()); await cromwellOnAzureEnvironment.ProcessAndAbortWorkflowsAsync(); @@ -209,15 +207,13 @@ public async Task NewWorkflowsThatFailToParseAsJsonAreAnotatedAndMovedToFailedSu .Setup(x => x.GetStorageAccountsUsingMsiAsync(It.IsAny())) .Returns(Task.FromResult((new List(), azureStorage.Object))); - var azureCloudConfig = AzureCloudConfig.FromKnownCloudNameAsync().Result; - var cromwellOnAzureEnvironment = new TriggerHostedService( logger, triggerServiceOptions.Object, cromwellApiClient2, tesTaskRepository, storageUtility.Object, - azureCloudConfig); + AzureCloudConfig.ForUnitTesting()); await cromwellOnAzureEnvironment.ProcessAndAbortWorkflowsAsync(); Assert.IsTrue(newTriggerName.StartsWith("failed/")); diff --git a/src/TriggerService.Tests/TriggerEngineTests.cs b/src/TriggerService.Tests/TriggerEngineTests.cs index 5b507894..6371330c 100644 --- a/src/TriggerService.Tests/TriggerEngineTests.cs +++ b/src/TriggerService.Tests/TriggerEngineTests.cs @@ -101,8 +101,7 @@ public async Task TriggerEngineRunsAndOnlyLogsAvailabilityOncePerSystemUponAvail .Setup(x => x.GetStorageAccountsUsingMsiAsync(It.IsAny())) .Returns(Task.FromResult((new List(), azureStorage.Object))); - var azureCloudConfig = AzureCloudConfig.FromKnownCloudNameAsync().Result; - var triggerHostedService = new TriggerHostedService(logger, triggerServiceOptions.Object, cromwellApiClient, tesTaskRepository, storageUtility.Object, azureCloudConfig); + var triggerHostedService = new TriggerHostedService(logger, triggerServiceOptions.Object, cromwellApiClient, tesTaskRepository, storageUtility.Object, AzureCloudConfig.ForUnitTesting()); //var engine = new TriggerHostedService(loggerFactory, environment.Object, TimeSpan.FromMilliseconds(25), TimeSpan.FromMilliseconds(25)); _ = Task.Run(() => triggerHostedService.StartAsync(new System.Threading.CancellationToken())); diff --git a/src/TriggerService.Tests/TriggerService.Tests.csproj b/src/TriggerService.Tests/TriggerService.Tests.csproj index 206e9b6c..50b08832 100644 --- a/src/TriggerService.Tests/TriggerService.Tests.csproj +++ b/src/TriggerService.Tests/TriggerService.Tests.csproj @@ -25,8 +25,6 @@ - - diff --git a/src/TriggerService.Tests/UpdateWorkflowStatusTests.cs b/src/TriggerService.Tests/UpdateWorkflowStatusTests.cs index 9772879f..f121a896 100644 --- a/src/TriggerService.Tests/UpdateWorkflowStatusTests.cs +++ b/src/TriggerService.Tests/UpdateWorkflowStatusTests.cs @@ -21,7 +21,6 @@ namespace TriggerService.Tests { [TestClass] - [Ignore] public class UpdateWorkflowStatusTests { public UpdateWorkflowStatusTests() @@ -431,8 +430,7 @@ static string ShardString(int shard) => .Setup(x => x.GetStorageAccountsUsingMsiAsync(It.IsAny())) .Returns(Task.FromResult((new List(), azureStorage.Object))); - var azureCloudConfig = AzureCloudConfig.FromKnownCloudNameAsync().Result; - var cromwellOnAzureEnvironment = new TriggerHostedService(logger, triggerServiceOptions.Object, cromwellApiClient.Object, repository.Object, storageUtility.Object, azureCloudConfig); + var cromwellOnAzureEnvironment = new TriggerHostedService(logger, triggerServiceOptions.Object, cromwellApiClient.Object, repository.Object, storageUtility.Object, AzureCloudConfig.ForUnitTesting()); await cromwellOnAzureEnvironment.UpdateWorkflowStatusesAsync(); diff --git a/src/ga4gh-tes b/src/ga4gh-tes index ec5cc56b..03d9060f 160000 --- a/src/ga4gh-tes +++ b/src/ga4gh-tes @@ -1 +1 @@ -Subproject commit ec5cc56b5191a7b6d34c456d5970ea3291084ea2 +Subproject commit 03d9060feba97cc270181237da860c549de504d6