initial mgmt group stage data classes extend the management group data class
This commit is contained in:
@@ -22,10 +22,10 @@ from atst.domain.csp.cloud.models import (
|
||||
BillingProfileTenantAccessCSPResult,
|
||||
BillingProfileVerificationCSPPayload,
|
||||
BillingProfileVerificationCSPResult,
|
||||
ManagementGroupCSPPayload,
|
||||
ManagementGroupCSPResponse,
|
||||
ManagementGroupGetCSPPayload,
|
||||
ManagementGroupGetCSPResponse,
|
||||
InitialMgmtGroupCSPPayload,
|
||||
InitialMgmtGroupCSPResponse,
|
||||
InitialMgmtGroupVerificationCSPPayload,
|
||||
InitialMgmtGroupVerificationCSPResponse,
|
||||
CostManagementQueryCSPResult,
|
||||
ProductPurchaseCSPPayload,
|
||||
ProductPurchaseCSPResult,
|
||||
@@ -116,13 +116,12 @@ def test_create_initial_mgmt_group_succeeds(mock_azure: AzureCloudProvider):
|
||||
mock_management_group_create(mock_azure, {"id": "Test Id"})
|
||||
mock_azure = mock_get_secret(mock_azure)
|
||||
|
||||
payload = ManagementGroupCSPPayload(
|
||||
payload = InitialMgmtGroupCSPPayload(
|
||||
tenant_id="1234",
|
||||
display_name=application.name,
|
||||
management_group_name=str(uuid4()),
|
||||
)
|
||||
|
||||
result: ManagementGroupCSPResponse = mock_azure.create_initial_mgmt_group(payload)
|
||||
result: InitialMgmtGroupCSPResponse = mock_azure.create_initial_mgmt_group(payload)
|
||||
|
||||
assert result.id == "Test Id"
|
||||
|
||||
@@ -136,11 +135,10 @@ def test_create_initial_mgmt_group_verification_succeeds(
|
||||
|
||||
management_group_name = str(uuid4())
|
||||
|
||||
payload = ManagementGroupGetCSPPayload(
|
||||
payload = InitialMgmtGroupVerificationCSPPayload(
|
||||
tenant_id="1234", management_group_name=management_group_name
|
||||
)
|
||||
|
||||
result: ManagementGroupGetCSPResponse = mock_azure.create_initial_mgmt_group_verification(
|
||||
result: InitialMgmtGroupVerificationCSPResponse = mock_azure.create_initial_mgmt_group_verification(
|
||||
payload
|
||||
)
|
||||
|
||||
|
@@ -112,7 +112,7 @@ def test_fsm_transition_start(mock_cloud_provider, portfolio: Portfolio):
|
||||
FSMStates.ADMIN_ROLE_DEFINITION_CREATED,
|
||||
FSMStates.PRINCIPAL_ADMIN_ROLE_CREATED,
|
||||
FSMStates.INITIAL_MGMT_GROUP_CREATED,
|
||||
FSMStates.PRODUCT_PURCHASE_VERIFICATION_CREATED,
|
||||
FSMStates.INITIAL_MGMT_GROUP_VERIFICATION_CREATED,
|
||||
FSMStates.TENANT_ADMIN_OWNERSHIP_CREATED,
|
||||
FSMStates.TENANT_PRINCIPAL_OWNERSHIP_CREATED,
|
||||
]
|
||||
@@ -133,6 +133,8 @@ def test_fsm_transition_start(mock_cloud_provider, portfolio: Portfolio):
|
||||
"user_id": user_id,
|
||||
"password": "jklfsdNCVD83nklds2#202", # pragma: allowlist secret
|
||||
"domain_name": domain_name,
|
||||
"display_name" : "mgmt group display name",
|
||||
"management_group_name" : "mgmt-group-uuid",
|
||||
"first_name": ppoc.first_name,
|
||||
"last_name": ppoc.last_name,
|
||||
"country_code": "US",
|
||||
|
Reference in New Issue
Block a user