Skip to content

Commit

Permalink
Run shfmt on split-horizon test
Browse files Browse the repository at this point in the history
  • Loading branch information
tplavcic committed Oct 16, 2023
1 parent f98716a commit 1369915
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions e2e-tests/split-horizon/run
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ configure_client_hostAliases() {
hostAliasesJson=$(echo $hostAliasesJson | jq --argjson newAlias "$hostAlias" '. += [$newAlias]')
done

kubectl_bin patch deployment psmdb-client --type='json' -p="[{'op': 'replace', 'path': '/spec/template/spec/hostAliases', 'value': $hostAliasesJson}]"
kubectl_bin patch deployment psmdb-client --type='json' -p="[{'op': 'replace', 'path': '/spec/template/spec/hostAliases', 'value': $hostAliasesJson}]"

wait_pod $(kubectl_bin get pods --selector=name=psmdb-client -o 'jsonpath={.items[].metadata.name}')
}
Expand Down Expand Up @@ -51,22 +51,22 @@ diff $test_dir/compare/horizons-3.json $tmp_dir/horizons-3.json
isMaster=$(run_mongo_tls "db.isMaster().ismaster" "clusterAdmin:clusterAdmin123456@some-name-rs0-0.clouddemo.xyz,some-name-rs0-1.clouddemo.xyz,some-name-rs0-2.clouddemo.xyz" mongodb "" "--quiet" | egrep -v 'I NETWORK|W NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:' | grep -v certificateNames)
if [ "${isMaster}" != "true" ]; then
collect_k8s_logs
echo "mongo client should've redirect the connection to primary"
exit 1
echo "mongo client should've redirect the connection to primary"
exit 1
fi

# stepping down to ensure we haven't redirected to primary just because primary is pod-0
run_mongo_tls "rs.stepDown()" \
"clusterAdmin:clusterAdmin123456@some-name-rs0-0.clouddemo.xyz,some-name-rs0-1.clouddemo.xyz,some-name-rs0-2.clouddemo.xyz" \
mongodb "" "--quiet"
"clusterAdmin:clusterAdmin123456@some-name-rs0-0.clouddemo.xyz,some-name-rs0-1.clouddemo.xyz,some-name-rs0-2.clouddemo.xyz" \
mongodb "" "--quiet"

sleep 10 # give some time for re-election

isMaster=$(run_mongo_tls "db.isMaster().ismaster" "clusterAdmin:clusterAdmin123456@some-name-rs0-0.clouddemo.xyz,some-name-rs0-1.clouddemo.xyz,some-name-rs0-2.clouddemo.xyz" mongodb "" "--quiet" | egrep -v 'I NETWORK|W NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:' | grep -v certificateNames)
if [ "${isMaster}" != "true" ]; then
collect_k8s_logs
echo "mongo client should've redirect the connection to primary"
exit 1
echo "mongo client should've redirect the connection to primary"
exit 1
fi

apply_cluster ${test_dir}/conf/${cluster}-5horizons.yml
Expand Down

0 comments on commit 1369915

Please sign in to comment.