Skip to content

Commit 4532d4e

Browse files
Test script cosmetics
1 parent 02ab25d commit 4532d4e

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

run_tests.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ pip freeze --all | tee pip_freeze_after_test.txt
1919
( diff pip_freeze_before.txt pip_freeze_after.txt || : ) | tee pip_freeze_diff.txt
2020
( diff pip_freeze_after.txt pip_freeze_after_test.txt || : ) | tee pip_freeze_diff_test.txt
2121
# Scanning sources
22-
bandit -r ./sagemaker_ssh_helper/ ./tests/ *.py --skip B603,B404,B101 2>&1 | tee bandit.txt
23-
flake8 --extend-ignore E501,F401,F541,E402 ./sagemaker_ssh_helper/ ./tests/ *.py | tee flake8.txt
22+
bandit -r ./sagemaker_ssh_helper/ ./tests/ ./*.py --skip B603,B404,B101 2>&1 | tee bandit.txt
23+
flake8 --extend-ignore E501,F401,F541,E402 ./sagemaker_ssh_helper/ ./tests/ ./*.py | tee flake8.txt
2424
# Configure local env
2525
id
2626
apt-get update
@@ -40,11 +40,11 @@ cdk bootstrap aws://"$ACCOUNT_ID"/"$REGION" \
4040
--require-approval never
4141
APP="python -m sagemaker_ssh_helper.cdk.tests_app"
4242
AWS_REGION=$REGION cdk -a "$APP" deploy SSH-IAM-SSM-Stack-Tests \
43-
-c sagemaker_role=$SAGEMAKER_ROLE -c user_role=$USER_ROLE \
43+
-c sagemaker_role="$SAGEMAKER_ROLE" -c user_role="$USER_ROLE" \
4444
--require-approval never
4545
APP="python -m sagemaker_ssh_helper.cdk.iam_ssm_app"
4646
AWS_REGION=$REGION cdk -a "$APP" deploy SSH-IAM-SSM-Stack \
47-
-c sagemaker_role=$SAGEMAKER_ROLE -c user_role=$USER_ROLE \
47+
-c sagemaker_role="$SAGEMAKER_ROLE" -c user_role="$USER_ROLE" \
4848
--require-approval never
4949
APP="python -m sagemaker_ssh_helper.cdk.advanced_tier_app"
5050
AWS_REGION=$REGION cdk -a "$APP" deploy SSM-Advanced-Tier-Stack \
@@ -82,11 +82,12 @@ export AWS_SESSION_TOKEN=${sts[2]}
8282
# Run tests
8383
echo "Extra args for pytest - $PYTEST_EXTRA_ARGS"
8484
cd tests
85+
# shellcheck disable=SC2086
8586
coverage run -m pytest \
8687
--html=pytest_report.html --self-contained-html --junitxml=pytest_report.xml \
8788
-m 'not manual' \
88-
-o sagemaker_studio_domain=$SAGEMAKER_STUDIO_DOMAIN \
89-
-o sns_notification_topic_arn=$SNS_NOTIFICATION_TOPIC_ARN \
89+
-o sagemaker_studio_domain="$SAGEMAKER_STUDIO_DOMAIN" \
90+
-o sns_notification_topic_arn="$SNS_NOTIFICATION_TOPIC_ARN" \
9091
$PYTEST_EXTRA_ARGS || EXIT_CODE=$?
9192
coverage report
9293
coverage xml

0 commit comments

Comments
 (0)