-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Testing create-bee failures with azureconfig update
- Loading branch information
aaronegrant
committed
Jun 6, 2024
1 parent
c294d82
commit 51e2828
Showing
9 changed files
with
103 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ export ADMIN_SERVICE_ACCOUNT_4="src/main/resources/rendered/admin-service-accoun | |
export ADMIN_SERVICE_ACCOUNT_5="src/main/resources/rendered/admin-service-account-5.json" | ||
export SERVICE_ACCOUNT_ADMINS="[email protected], [email protected]" | ||
export AZURE_ENABLED="false" | ||
export AZURE_SERVICE_CATALOG_APPS_ENABLED="false" | ||
export EMAIL_DOMAIN="dev.test.firecloud.org" | ||
export ENVIRONMENT="dev" | ||
export GOOGLE_APPS_DOMAIN="test.firecloud.org" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -294,6 +294,12 @@ class AzureServiceSpec(_system: ActorSystem) | |
mockMrgDAO | ||
) | ||
|
||
when(mockAzureServicesConfig.azureServiceCatalogAppsEnabled) | ||
.thenReturn(false) | ||
|
||
when(mockCrlService.getManagedAppPlans) | ||
.thenReturn(Seq(MockCrlService.defaultManagedAppPlan)) | ||
|
||
svc.createManagedResourceGroup(managedResourceGroup, samRequestContext.copy(samUser = user)).unsafeRunSync() | ||
mockMrgDAO.mrgs should contain(managedResourceGroup) | ||
} | ||
|
@@ -340,6 +346,9 @@ class AzureServiceSpec(_system: ActorSystem) | |
mockMrgDAO | ||
) | ||
|
||
when(mockAzureServicesConfig.azureServiceCatalogAppsEnabled) | ||
.thenReturn(false) | ||
|
||
mockMrgDAO.insertManagedResourceGroup(managedResourceGroup.copy(billingProfileId = BillingProfileId("no the same")), samRequestContext).unsafeRunSync() | ||
val err = intercept[WorkbenchExceptionWithErrorReport] { | ||
svc.createManagedResourceGroup(managedResourceGroup, samRequestContext.copy(samUser = user)).unsafeRunSync() | ||
|
@@ -363,6 +372,9 @@ class AzureServiceSpec(_system: ActorSystem) | |
mockMrgDAO | ||
) | ||
|
||
when(mockAzureServicesConfig.azureServiceCatalogAppsEnabled) | ||
.thenReturn(false) | ||
|
||
when(mockCrlService.getManagedAppPlans) | ||
.thenReturn(Seq(MockCrlService.defaultManagedAppPlan)) | ||
|
||
|
@@ -387,6 +399,9 @@ class AzureServiceSpec(_system: ActorSystem) | |
val mockAzureServicesConfig = mock[AzureServicesConfig] | ||
val svc = new AzureService(mockAzureServicesConfig, MockCrlService(user), new MockDirectoryDAO(), mockMrgDAO) | ||
|
||
when(mockAzureServicesConfig.azureServiceCatalogAppsEnabled) | ||
.thenReturn(false) | ||
|
||
val err = intercept[WorkbenchExceptionWithErrorReport] { | ||
svc.createManagedResourceGroup(managedResourceGroup, samRequestContext.copy(samUser = user)).unsafeRunSync() | ||
} | ||
|
@@ -415,6 +430,9 @@ class AzureServiceSpec(_system: ActorSystem) | |
.head | ||
when(mockApplication.managedResourceGroupId()).thenReturn("something else") | ||
|
||
when(mockAzureServicesConfig.azureServiceCatalogAppsEnabled) | ||
.thenReturn(false) | ||
|
||
val err = intercept[WorkbenchExceptionWithErrorReport] { | ||
svc.createManagedResourceGroup(managedResourceGroup, samRequestContext.copy(samUser = user)).unsafeRunSync() | ||
} | ||
|
@@ -444,6 +462,9 @@ class AzureServiceSpec(_system: ActorSystem) | |
when(mockApplication.plan()) | ||
.thenReturn(null) | ||
|
||
when(mockAzureServicesConfig.azureServiceCatalogAppsEnabled) | ||
.thenReturn(false) | ||
|
||
val err = intercept[WorkbenchExceptionWithErrorReport] { | ||
svc.createManagedResourceGroup(managedResourceGroup, samRequestContext.copy(samUser = user)).unsafeRunSync() | ||
} | ||
|
@@ -472,6 +493,9 @@ class AzureServiceSpec(_system: ActorSystem) | |
when(mockApplication.plan()) | ||
.thenReturn(new Plan().withName(MockCrlService.defaultManagedAppPlan.name).withPublisher("other publisher")) | ||
|
||
when(mockAzureServicesConfig.azureServiceCatalogAppsEnabled) | ||
.thenReturn(false) | ||
|
||
val err = intercept[WorkbenchExceptionWithErrorReport] { | ||
svc.createManagedResourceGroup(managedResourceGroup, samRequestContext.copy(samUser = user)).unsafeRunSync() | ||
} | ||
|
@@ -500,6 +524,9 @@ class AzureServiceSpec(_system: ActorSystem) | |
when(mockApplication.plan()) | ||
.thenReturn(new Plan().withName("other name").withPublisher(MockCrlService.defaultManagedAppPlan.publisher)) | ||
|
||
when(mockAzureServicesConfig.azureServiceCatalogAppsEnabled) | ||
.thenReturn(false) | ||
|
||
val err = intercept[WorkbenchExceptionWithErrorReport] { | ||
svc.createManagedResourceGroup(managedResourceGroup, samRequestContext.copy(samUser = user)).unsafeRunSync() | ||
} | ||
|
@@ -521,6 +548,9 @@ class AzureServiceSpec(_system: ActorSystem) | |
mockMrgDAO | ||
) | ||
|
||
when(mockAzureServicesConfig.azureServiceCatalogAppsEnabled) | ||
.thenReturn(false) | ||
|
||
val err = intercept[WorkbenchExceptionWithErrorReport] { | ||
svc | ||
.createManagedResourceGroup(managedResourceGroup, samRequestContext.copy(samUser = user.map(_.copy(email = WorkbenchEmail("[email protected]"))))) | ||
|
@@ -562,6 +592,9 @@ class AzureServiceSpec(_system: ActorSystem) | |
when(mockApplication.parameters()) | ||
.thenReturn(parameters) | ||
|
||
when(mockAzureServicesConfig.azureServiceCatalogAppsEnabled) | ||
.thenReturn(false) | ||
|
||
val err = intercept[WorkbenchExceptionWithErrorReport] { | ||
svc.createManagedResourceGroup(managedResourceGroup, samRequestContext.copy(samUser = user)).unsafeRunSync() | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters