-
Notifications
You must be signed in to change notification settings - Fork 14
Enhance SCS cluster status tests with additional resource attributes #76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,69 @@ | ||
| <!-- filepath: /home/devanshjain/SDAF/sap-automation-qa/docs/pseudocode/ha-failover-to-node.md --> | ||
| # HAFailoverToNode Test Case | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - Functioning SCS cluster | ||
| - Two active nodes (ASCS and ERS) | ||
| - Cluster services running | ||
| - Proper resource configuration | ||
|
|
||
| ## Validation | ||
|
|
||
| - Verify failover to the ERS node | ||
| - Check cluster stability | ||
| - Validate proper role changes | ||
|
|
||
| ## Pseudocode | ||
|
|
||
| ```pseudocode | ||
| FUNCTION HAFailoverToNodeTest(): | ||
| // Setup Phase | ||
| EXECUTE TestSetup() | ||
| EXECUTE PreValidations() | ||
|
|
||
| IF pre_validations_status != "PASSED" THEN | ||
| RETURN "Test Prerequisites Failed" | ||
|
|
||
| // Main Test Execution | ||
| TRY: | ||
| IF current_node == ascs_node THEN | ||
| record_start_time() | ||
|
|
||
| // Execute Failover Command | ||
| success = execute_failover_command(ers_node) | ||
| IF NOT success THEN | ||
| THROW "Failed to execute failover command" | ||
|
|
||
| // Validate Cluster Status | ||
| cluster_status = validate_cluster_status() | ||
| IF cluster_status.ascs_node != ers_node OR cluster_status.ers_node != ascs_node THEN | ||
| THROW "Cluster status validation failed after failover" | ||
|
|
||
| // Cleanup Constraints | ||
| success = remove_location_constraints() | ||
| IF NOT success THEN | ||
| THROW "Failed to remove location constraints" | ||
|
|
||
| // Cleanup Resources | ||
| success = cleanup_cluster_resources() | ||
| IF NOT success THEN | ||
| THROW "Failed to cleanup cluster resources" | ||
|
|
||
| record_end_time() | ||
| generate_test_report() | ||
| END IF | ||
|
|
||
| EXECUTE PostValidations() | ||
|
|
||
| CATCH any_error: | ||
| LOG "Error occurred: " + any_error | ||
| EXECUTE RescueOperations() | ||
| EXECUTE CleanupOperations() | ||
| RETURN "TEST_FAILED" | ||
| FINALLY: | ||
| EXECUTE EnsureClusterHealth() | ||
|
|
||
| RETURN "TEST_PASSED" | ||
| END FUNCTION | ||
| ``` |
This file contains hidden or 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,112 @@ | ||
| <!-- filepath: /home/devanshjain/SDAF/sap-automation-qa/docs/pseudocode/kill-message-server.md --> | ||
| # Kill Message Server Process Test Case | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - Functioning SCS cluster | ||
| - Two active nodes (ASCS and ERS) | ||
| - Cluster services running | ||
| - Proper resource configuration | ||
|
|
||
| ## Validation | ||
|
|
||
| - Verify failover to the ERS node | ||
| - Check cluster stability | ||
| - Validate proper role changes | ||
|
|
||
| ## Pseudocode | ||
|
|
||
| ```pseudocode | ||
| FUNCTION KillMessageServerTest(): | ||
| // Setup Phase | ||
| EXECUTE TestSetup() | ||
| EXECUTE PreValidations() | ||
|
|
||
| IF pre_validations_status != "PASSED" THEN | ||
| RETURN "Test Prerequisites Failed" | ||
|
|
||
| // Main Test Execution | ||
| TRY: | ||
| IF current_node == ascs_node THEN | ||
| record_start_time() | ||
|
|
||
| // Check ENSA Version | ||
| ensa_version = check_ensa_version() | ||
|
|
||
| // Kill Message Server Process | ||
| success = kill_message_server_process() | ||
| IF NOT success THEN | ||
| THROW "Failed to kill message server process" | ||
|
|
||
| // Validate ASCS Node Stopped | ||
| cluster_status = validate_cluster_status() | ||
| IF cluster_status.ascs_node != "" THEN | ||
| THROW "ASCS node did not stop as expected" | ||
|
|
||
| // Validate Failover to ERS Node | ||
| cluster_status = validate_cluster_status() | ||
| IF cluster_status.ascs_node != ers_node OR cluster_status.ers_node != ascs_node THEN | ||
| THROW "Failover validation failed" | ||
|
|
||
| // Cleanup Resources | ||
| success = cleanup_cluster_resources() | ||
| IF NOT success THEN | ||
| THROW "Failed to cleanup cluster resources" | ||
|
|
||
| record_end_time() | ||
| generate_test_report() | ||
| END IF | ||
|
|
||
| EXECUTE PostValidations() | ||
|
|
||
| CATCH any_error: | ||
| LOG "Error occurred: " + any_error | ||
| EXECUTE RescueOperations() | ||
| EXECUTE CleanupOperations() | ||
| RETURN "TEST_FAILED" | ||
| FINALLY: | ||
| EXECUTE EnsureClusterHealth() | ||
|
|
||
| RETURN "TEST_PASSED" | ||
| END FUNCTION | ||
| ``` | ||
|
|
||
| ## Kill Enqueue, Enqueue Replication, and sapstartsrv Processes | ||
|
|
||
| These test cases are specific instances of killing processes, focusing on enqueue, enqueue replication, and sapstartsrv processes. | ||
|
|
||
| ### Additional Steps for Each Process | ||
|
|
||
| - Validate process-specific failover behavior. | ||
| - Ensure proper role changes for ASCS and ERS nodes. | ||
|
|
||
| ### Pseudocode Extension | ||
|
|
||
| ```pseudocode | ||
| FUNCTION KillEnqueueProcessTest(): | ||
| // Reuse KillMessageServerTest pseudocode | ||
| CALL KillMessageServerTest() | ||
|
|
||
| // Additional enqueue-specific validations | ||
| validate_enqueue_failover_behavior() | ||
| ensure_enqueue_role_changes() | ||
| END FUNCTION | ||
|
|
||
| FUNCTION KillEnqueueReplicationProcessTest(): | ||
| // Reuse KillMessageServerTest pseudocode | ||
| CALL KillMessageServerTest() | ||
|
|
||
| // Additional enqueue replication-specific validations | ||
| validate_enqueue_replication_failover_behavior() | ||
| ensure_enqueue_replication_role_changes() | ||
| END FUNCTION | ||
|
|
||
| FUNCTION KillSapstartsrvProcessTest(): | ||
| // Reuse KillMessageServerTest pseudocode | ||
| CALL KillMessageServerTest() | ||
|
|
||
| // Additional sapstartsrv-specific validations | ||
| validate_sapstartsrv_failover_behavior() | ||
| ensure_sapstartsrv_role_changes() | ||
| END FUNCTION | ||
| ``` |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.