From ea842b8e107d4c0770ed678e6e1ddaa76a0acac4 Mon Sep 17 00:00:00 2001 From: Pat Myron Date: Thu, 26 Jan 2023 18:32:47 -0500 Subject: [PATCH] script to generate test snapshots (#2566) * script to generate test snapshots close https://github.com/aws-cloudformation/cfn-lint/issues/2561 * inline directory name Co-authored-by: Kevin DeJong --- scripts/update_snapshot_results.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 scripts/update_snapshot_results.sh diff --git a/scripts/update_snapshot_results.sh b/scripts/update_snapshot_results.sh new file mode 100755 index 0000000000..9b994de8df --- /dev/null +++ b/scripts/update_snapshot_results.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +# public/ +cfn-lint test/fixtures/templates/public/lambda-poller.yaml -e -c I --format json > test/fixtures/results/public/lambda-poller.json +cfn-lint test/fixtures/templates/public/watchmaker.json -e -c I --format json > test/fixtures/results/public/watchmaker.json + +# quickstart/non_strict/ +cfn-lint test/fixtures/templates/quickstart/cis_benchmark.yaml -e -c I --format json > test/fixtures/results/quickstart/non_strict/cis_benchmark.json +cfn-lint test/fixtures/templates/quickstart/nist_application.yaml -e -c I --format json > test/fixtures/results/quickstart/non_strict/nist_application.json +cfn-lint test/fixtures/templates/quickstart/nist_high_main.yaml -e -c I --format json > test/fixtures/results/quickstart/non_strict/nist_high_main.json +cfn-lint test/fixtures/templates/quickstart/openshift.yaml -e -c I --format json > test/fixtures/results/quickstart/non_strict/openshift.json + +# quickstart/ +cfn-lint test/fixtures/templates/quickstart/cis_benchmark.yaml -e -c I --format json -x E3012:strict=true > test/fixtures/results/quickstart/cis_benchmark.json +cfn-lint test/fixtures/templates/quickstart/nist_application.yaml -e -c I --format json -x E3012:strict=true > test/fixtures/results/quickstart/nist_application.json +cfn-lint test/fixtures/templates/quickstart/nist_config_rules.yaml -e -c I --format json -x E3012:strict=true > test/fixtures/results/quickstart/nist_config_rules.json +cfn-lint test/fixtures/templates/quickstart/nist_high_main.yaml -e -c I --format json -x E3012:strict=true > test/fixtures/results/quickstart/nist_high_main.json +cfn-lint test/fixtures/templates/quickstart/nist_iam.yaml -e -c I --format json -x E3012:strict=true > test/fixtures/results/quickstart/nist_iam.json +cfn-lint test/fixtures/templates/quickstart/nist_logging.yaml -e -c I --format json -x E3012:strict=true > test/fixtures/results/quickstart/nist_logging.json +cfn-lint test/fixtures/templates/quickstart/nist_vpc_management.yaml -e -c I --format json -x E3012:strict=true > test/fixtures/results/quickstart/nist_vpc_management.json +cfn-lint test/fixtures/templates/quickstart/nist_vpc_production.yaml -e -c I --format json -x E3012:strict=true > test/fixtures/results/quickstart/nist_vpc_production.json +cfn-lint test/fixtures/templates/quickstart/openshift.yaml -e -c I --format json -x E3012:strict=true > test/fixtures/results/quickstart/openshift.json +cfn-lint test/fixtures/templates/quickstart/openshift_master.yaml -e -c I --format json -x E3012:strict=true > test/fixtures/results/quickstart/openshift_master.json