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
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ if [ -z "${AWS_DEFAULT_REGION+x}" ]; then
fi

# setting projectName
projectName="cfn-bot-access-list-$((1 + RANDOM % 10000))"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from PR description was curious how we got to this work, is there any related CLOUDP or related PR in which we detected this issue?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Saw tests failing due to duplicated names while merging sdk updates. Need to re-run in those cases to roll the dice again.

projectName="cfn-bot-access-list-$(date +%s)-$RANDOM"

./test/cfn-test-create-inputs.sh $projectName
./test/cfn-test-create-inputs.sh "$projectName"
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ set -o nounset
set -o pipefail

# setting projectName
projectName="ct-alert-config-$((1 + RANDOM % 10000))"
projectName="ct-alert-config-$(date +%s)-$RANDOM"

./test/cfn-test-create-inputs.sh $projectName
./test/cfn-test-create-inputs.sh "$projectName"
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ set -o nounset
set -o pipefail

# setting projectName
projectName="cfn-bot-apikey-test-$((1 + RANDOM % 10000))"
projectName="cfn-bot-apikey-test-$(date +%s)-$RANDOM"

./test/cfn-test-create-inputs.sh $projectName
./test/cfn-test-create-inputs.sh "$projectName"
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ fi
org_id="${MONGODB_ATLAS_ORG_ID}"
profile="${MONGODB_ATLAS_PROFILE}"

project_name="Project-$((1 + RANDOM % 10000))"
project_name="Project-$(date +%s)-$RANDOM"
projectId=$(atlas projects create "${project_name}" --orgId "${org_id}" --output json | jq -r '.id')

rm -rf "inputs" && mkdir "inputs"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ set -o nounset
set -o pipefail

# setting projectName
projectName="ct-cloud-backup-restore-jobs-$((1 + RANDOM % 10000))"
projectName="ct-cloud-backup-restore-jobs-$(date +%s)-$RANDOM"

./test/cfn-test-create-inputs.sh $projectName
./test/cfn-test-create-inputs.sh "$projectName"
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ if [ -z "${AWS_DEFAULT_REGION+x}" ]; then
fi

# setting projectName
projectName="cluster-outage-simulation-limit-$((1 + RANDOM % 10000))"
projectName="cluster-outage-simulation-$(date +%s)-$RANDOM"

./test/cfn-test-create-inputs.sh $projectName
./test/cfn-test-create-inputs.sh "$projectName"
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ if [ -z "${AWS_DEFAULT_REGION+x}" ]; then
fi

# setting projectName
projectName="ct-federated-db-instance-$((1 + RANDOM % 10000))"
projectName="ct-federated-db-instance-$(date +%s)-$RANDOM"
# trigger create inputs for the cfn test
./test/cfn-test-create-inputs.sh $projectName
./test/cfn-test-create-inputs.sh "$projectName"
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ if [ -z "${AWS_DEFAULT_REGION+x}" ]; then
fi

# setting projectName
projectName="ct-federated-query-limit-$((1 + RANDOM % 10000))"
projectName="ct-federated-query-limit-$(date +%s)-$RANDOM"

./test/cfn-test-create-inputs.sh $projectName
./test/cfn-test-create-inputs.sh "$projectName"
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ else
echo -e "FOUND project \"${projectName}\" with id: ${projectId}\n"
fi

clusterName="cfn-test-bot-$((1 + RANDOM % 10000))"
clusterName="cfn-test-bot-$(date +%s)-$RANDOM"
echo "clusterName: $clusterName"

WORDTOREMOVE="template."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -o errexit
set -o nounset
set -o pipefail

projectName="cfn-test-bot-$((1 + RANDOM % 10000))"
projectName="cfn-test-bot-$(date +%s)-$RANDOM"

# create project
projectId=$(atlas projects create "${projectName}" --output=json | jq -r '.id')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ if [ -z "${AWS_DEFAULT_REGION+x}" ]; then
fi

# setting projectName
projectName="ct-online-archive-$((1 + RANDOM % 10000))"
projectName="ct-online-archive-$(date +%s)-$RANDOM"

./test/cfn-test-create-inputs.sh $projectName
./test/cfn-test-create-inputs.sh "$projectName"
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ set -o errexit
set -o nounset
set -o pipefail

# setting projectName
orgName="cfn-bot-org-test-$((1 + RANDOM % 1000))"
# setting orgName
orgName="cfn-bot-org-test-$(date +%s)-$RANDOM"

if [ -z ${MONGODB_ATLAS_PROFILE+x} ]; then
echo "MONGODB_ATLAS_PROFILE is not set, exiting..."
exit 1
fi

./test/cfn-test-create-inputs.sh $orgName
./test/cfn-test-create-inputs.sh "$orgName"
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ if [ -z "${AWS_DEFAULT_REGION+x}" ];then
fi

# setting projectName
projectName="ct-private-endpoint-$((1 + RANDOM % 10000))"
projectName="ct-private-endpoint-$(date +%s)-$RANDOM"

./test/cfn-test-create-inputs.sh $projectName
./test/cfn-test-create-inputs.sh "$projectName"
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ if [ -z "${AWS_DEFAULT_REGION+x}" ];then
fi

# setting projectName
projectName="ct-private-endpoint-$((1 + RANDOM % 10000))"
projectName="ct-private-endpoint-$(date +%s)-$RANDOM"

./test/cfn-test-create-inputs.sh $projectName
./test/cfn-test-create-inputs.sh "$projectName"
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ if [ -z "${AWS_DEFAULT_REGION+x}" ]; then
fi

# setting projectName
projectName="pes-online-archive-$((1 + RANDOM % 10000))"
projectName="pes-online-archive-$(date +%s)-$RANDOM"

./test/cfn-test-create-inputs.sh $projectName
./test/cfn-test-create-inputs.sh "$projectName"
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ fi
org_id="${MONGODB_ATLAS_ORG_ID}"
team_id="${MONGODB_ATLAS_TEAM_ID}"
profile="${MONGODB_ATLAS_PROFILE}"
project_name="Project-$((1 + RANDOM % 10000))"
project_name="Project-$(date +%s)-$RANDOM"

if [ -z "${MONGODB_ATLAS_ORG_API_KEY_ID+x}" ]; then
api_key_id=$(atlas organizations apikeys create --desc "Created as part of the contract testing: ${project_name}" --role ORG_MEMBER --output json | jq -r '.id')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ set -o errexit
set -o nounset
set -o pipefail

# setting projectName
policyName="ct-resource-policy-$((1 + RANDOM % 10000))"
# setting policyName
policyName="ct-resource-policy-$(date +%s)-$RANDOM"

./test/cfn-test-create-inputs.sh $policyName
./test/cfn-test-create-inputs.sh "$policyName"
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ set -o nounset
set -o pipefail

# setting projectName
projectName="ct-search-deployment-$((1 + RANDOM % 10000))"
projectName="ct-search-deployment-$(date +%s)-$RANDOM"

./test/cfn-test-create-inputs.sh $projectName
./test/cfn-test-create-inputs.sh "$projectName"
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fi
cluster_name=${ClusterName}
db_name="${4:-sample_airbnb}"
coll_name="${5:-listingsAndReviews}"
index_name="search-$RANDOM"
index_name="search-$(date +%s)-$RANDOM"
u_index_name="${index_name}"
WORDTOREMOVE="template."
cd "$(dirname "$0")" || exit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ if [ -z "${AWS_DEFAULT_REGION+x}" ]; then
fi

# setting projectName
projectName="ct-private-endpoint-serverless-$((1 + RANDOM % 10000))"
projectName="ct-private-endpoint-serverless-$(date +%s)-$RANDOM"

./test/cfn-test-create-inputs.sh $projectName
./test/cfn-test-create-inputs.sh "$projectName"
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ else
fi
echo -e "=====\nrun this command to clean up\n=====\nmongocli iam projects delete ${projectId} --force\n====="

instanceName="stream-instance-$RANDOM"
instanceName="stream-instance-$(date +%s)-$RANDOM"
cloudProvider="AWS"
clusterName="cluster-$RANDOM"
clusterName="cluster-$(date +%s)-$RANDOM"

atlas streams instances create "${instanceName}" --projectId "${projectId}" --region VIRGINIA_USA --provider ${cloudProvider}
echo -e "Created StreamInstance \"${instanceName}\""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ if [ -z "${AWS_DEFAULT_REGION+x}" ]; then
fi

# setting projectName
projectName="cfn-stream-conn-$((1 + RANDOM % 10000))"
projectName="cfn-stream-conn-$(date +%s)-$RANDOM"

./test/cfn-test-create-inputs.sh $projectName
./test/cfn-test-create-inputs.sh "$projectName"
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ else
echo -e "FOUND project \"${projectName}\" with id: ${projectId}\n"
fi

streamInstanceName="stream-$RANDOM"
streamInstanceName="stream-$(date +%s)-$RANDOM"
cloudProvider="AWS"
region="VIRGINIA_USA"
tier="SP30"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ if [ -z "${AWS_DEFAULT_REGION+x}" ]; then
fi

# setting projectName
projectName="stream-instance-$((1 + RANDOM % 10000))"
projectName="stream-instance-$(date +%s)-$RANDOM"

./test/cfn-test-create-inputs.sh $projectName
./test/cfn-test-create-inputs.sh "$projectName"
2 changes: 1 addition & 1 deletion cfn-resources/trigger/test/cfn-test-create-inputs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ mkdir inputs
project_Id="${2:-$PROJECT_ID}"
db_name="${3:-$DB_NAME}"
coll_name="${4:-$COLLECTION_NAME}"
trigger_name="cfn-test-trigger-${RANDOM}"
trigger_name="cfn-test-trigger-$(date +%s)-$RANDOM"
func_name="${5:-$FUNC_NAME}"
func_id="${6:-$FUNC_ID}"
service_id="${7:-$SERVICE_ID}"
Expand Down
Loading