Skip to content

Commit 373163f

Browse files
authored
chore: Fix stream-connection tests (#1498)
1 parent e48aad9 commit 373163f

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

cfn-resources/stream-connection/test/cfn-test-create-inputs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ clusterName="cluster-$RANDOM"
3535
atlas streams instances create "${instanceName}" --projectId "${projectId}" --region VIRGINIA_USA --provider ${cloudProvider}
3636
echo -e "Created StreamInstance \"${instanceName}\""
3737

38-
atlas clusters create "${clusterName}" --projectId "${projectId}" --backup --provider AWS --region US_EAST_1 --members 3 --tier M10 --mdbVersion 6.0 --diskSizeGB 10 --output=json
38+
atlas clusters create "${clusterName}" --projectId "${projectId}" --backup --provider AWS --region US_EAST_1 --members 3 --tier M10 --diskSizeGB 10 --output=json
3939
atlas clusters watch "${clusterName}" --projectId "${projectId}"
4040
echo -e "Created Cluster \"${clusterName}\""
4141

cfn-resources/stream-connection/test/cfn-test-delete-inputs.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ function usage {
1111
}
1212

1313
projectId=$(jq -r '.ProjectId' ./inputs/inputs_1_create.json)
14-
1514
clusterName=$(jq -r '.ClusterName' ./inputs/inputs_1_create.json)
15+
instanceName=$(jq -r '.InstanceName' ./inputs/inputs_1_create.json)
1616

1717
if atlas cluster delete "${clusterName}" --projectId "${projectId}" --force; then
1818
echo "deleting cluster with name ${clusterName}"
@@ -25,6 +25,13 @@ if [ "$status" -eq 0 ]; then
2525
echo "Cluster '${clusterName}' has been successfully watched until deletion."
2626
fi
2727

28+
#delete stream instance
29+
if atlas streams instances delete "${instanceName}" --projectId "${projectId}" --force; then
30+
echo "deleting stream instance with name ${instanceName}"
31+
else
32+
echo "failed to delete the stream instance with name ${instanceName}"
33+
fi
34+
2835
#delete project
2936
if atlas projects delete "$projectId" --force; then
3037
echo "$projectId project deletion OK"

cfn-resources/stream-connection/test/inputs_1_update.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"ConnectionName": "ConnectionNameCluster",
77
"Type": "Cluster",
88
"DbRoleToExecute": {
9-
"Role": "readWrite",
9+
"Role": "readWriteAnyDatabase",
1010
"Type": "BUILT_IN"
1111
}
1212
}

0 commit comments

Comments
 (0)