-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for
coriolis.conductor.rpc.server
module
- Loading branch information
1 parent
cfd2da4
commit 3cddb9a
Showing
5 changed files
with
2,474 additions
and
20 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
34 changes: 34 additions & 0 deletions
34
coriolis/tests/conductor/rpc/data/cancel_migration_config.yml
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
- config: | ||
force: False | ||
execution_statuses: [EXECUTION_STATUS_RUNNING] | ||
raises_exception: False | ||
|
||
- config: | ||
force: False | ||
execution_statuses: [] | ||
raises_exception: True | ||
|
||
- config: | ||
force: False | ||
execution_statuses: [EXECUTION_STATUS_COMPLETED] | ||
raises_exception: True | ||
|
||
- config: | ||
force: True | ||
execution_statuses: [EXECUTION_STATUS_CANCELLING] | ||
raises_exception: False | ||
|
||
- config: | ||
force: False | ||
execution_statuses: [EXECUTION_STATUS_CANCELLING] | ||
raises_exception: True | ||
|
||
- config: | ||
force: False | ||
execution_statuses: [EXECUTION_STATUS_AWAITING_MINION_ALLOCATIONS] | ||
raises_exception: False | ||
|
||
- config: | ||
force: True | ||
execution_statuses: [EXECUTION_STATUS_RUNNING, EXECUTION_STATUS_CANCELLING, EXECUTION_STATUS_AWAITING_MINION_ALLOCATIONS] | ||
raises_exception: True |
19 changes: 19 additions & 0 deletions
19
coriolis/tests/conductor/rpc/data/confirm_task_cancellation.yml
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
- task_status: TASK_STATUS_CANCELLING_AFTER_COMPLETION | ||
expected_final_status: TASK_STATUS_CANCELED | ||
expected_advance_execution_state_call: True | ||
|
||
- task_status: TASK_STATUS_FORCE_CANCELED | ||
expected_final_status: TASK_STATUS_FORCE_CANCELED | ||
expected_advance_execution_state_call: False | ||
|
||
- task_status: TASK_STATUS_FAILED_TO_CANCEL | ||
expected_final_status: TASK_STATUS_CANCELED | ||
expected_advance_execution_state_call: True | ||
|
||
- task_status: TASK_STATUS_COMPLETED | ||
expected_final_status: TASK_STATUS_COMPLETED | ||
expected_advance_execution_state_call: False | ||
|
||
- task_status: EXECUTION_STATUS_RUNNING | ||
expected_final_status: TASK_STATUS_CANCELED | ||
expected_advance_execution_state_call: True |
38 changes: 38 additions & 0 deletions
38
coriolis/tests/conductor/rpc/data/update_replica_config.yml
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
- config: | ||
replica: | ||
instances: ['mock_instance_1', 'mock_instance_2'] | ||
info: | ||
mock_instance_1: {} | ||
mock_instance_2: {} | ||
updated_properties: | ||
origin_minion_pool_id: "mock_origin_minion_pool_id" | ||
destination_minion_pool_id: "mock_destination_minion_pool_id" | ||
instance_osmorphing_minion_pool_mappings: | ||
mock_instance_1: "mock_pool" | ||
mock_instance_2: "mock_pool" | ||
user_scripts: "mock_user_scripts" | ||
instances: ['mock_instance_1', 'mock_instance_2'] | ||
destination_environment: | ||
network_map: "mock_network_map" | ||
has_updated_values: True | ||
has_replica_instance: True | ||
|
||
- config: | ||
replica: {} | ||
updated_properties: | ||
origin_minion_pool_id: "mock_origin_minion_pool_id" | ||
destination_minion_pool_id: "mock_destination_minion_pool_id" | ||
instance_osmorphing_minion_pool_mappings: | ||
mock_instance_1: "mock_pool" | ||
mock_instance_2: "mock_pool" | ||
user_scripts: "mock_user_scripts" | ||
destination_environment: | ||
network_map: "mock_network_map" | ||
has_updated_values: True | ||
has_replica_instance: False | ||
|
||
- config: | ||
replica: {} | ||
updated_properties: {} | ||
has_updated_values: False | ||
has_replica_instance: False |
Oops, something went wrong.