Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/run_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ jobs:
Pgskipper-Pipeline:
if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.user.login != 'dependabot[bot]' }}
needs: Wait-for-images
uses: Netcracker/qubership-test-pipelines/.github/workflows/pgskipper.yaml@34e86efe815cb03fea20efa760989cd21ca0c776 #master
uses: Netcracker/qubership-test-pipelines/.github/workflows/pgskipper.yaml@timeout_pg #master
with:
repository_name: ${{ github.repository }}
service_branch: '${{ github.head_ref || github.ref_name }}'
pipeline_branch: '34e86efe815cb03fea20efa760989cd21ca0c776' #this value must match the value after '@' in 'uses'
pipeline_branch: 'timeout_pg' #this value must match the value after '@' in 'uses'
secrets:
AWS_S3_ACCESS_KEY_ID: ${{secrets.AWS_S3_ACCESS_KEY_ID}}
AWS_S3_ACCESS_KEY_SECRET: ${{secrets.AWS_S3_ACCESS_KEY_SECRET}}
Expand Down
40 changes: 20 additions & 20 deletions tests/robot/check_delete_master/check_delete_master.robot
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
*** Settings ***
Documentation Check scaledown replica
Documentation Check delete master
Library Collections
Library OperatingSystem
Library String
Expand All @@ -10,25 +10,25 @@ Resource ../Lib/lib.robot
Check Delete Master
[Tags] patroni full check_delete_master
Run Keyword Checks Before Tests

${MASTER}= Get Master Pod
# insert test records
${OLD_MASTER_NAME}= Set Variable ${MASTER.metadata.name}

# insert test records before deleting master
${RID} ${EXPECTED}= Insert Test Record ${MASTER.status.pod_ip}
# delete mater pod
Log To Console Deleting Master Pod "${MASTER.metadata.name}"
Run Keyword Delete Pod ${MASTER.metadata.name} 30
# wait new master
Log To Console Wait new master election keyword
Wait Until Keyword Succeeds 120 sec 1 sec Check If New Master Elected ${MASTER.metadata.name}
# wait while all replicas back
Wait Until Keyword Succeeds 120 sec 1 sec Check Replica Count

Log To Console Deleting Master Pod "${OLD_MASTER_NAME}"
Run Keyword Delete Pod ${OLD_MASTER_NAME} 30

Log To Console Wait until cluster recovers after master deletion
Wait Until Keyword Succeeds 300 sec 5 sec Wait Replica Pods In Up State
Wait Until Keyword Succeeds 300 sec 5 sec Check Replica Count

${NEW_MASTER}= Get Master Pod
Log To Console New Master ${NEW_MASTER.metadata.name}
# wait new replica pod is up
Wait Until Keyword Succeeds 120 sec 2 sec Wait Replica Pods In Up State
# check master not read-only
Log To Console Test New Master Works
Wait Until Keyword Succeeds ${120} 1 sec Insert Test Record ${NEW_MASTER.status.pod_ip}
# check existance unavaliabled replicas
Run Keyword Check Replica Count
# check replication again, becouse it is simple! :)
Run Keyword Replication Works
Log To Console Current Master ${NEW_MASTER.metadata.name}

Log To Console Test Current Master Works
Wait Until Keyword Succeeds 300 sec 5 sec Insert Test Record ${NEW_MASTER.status.pod_ip}

Wait Until Keyword Succeeds 300 sec 5 sec Check Replica Count
Wait Until Keyword Succeeds 300 sec 5 sec Replication Works
Loading