diff --git a/scripts/run_platform.sh b/scripts/run_platform.sh index dde6749..f8c2b13 100755 --- a/scripts/run_platform.sh +++ b/scripts/run_platform.sh @@ -135,21 +135,19 @@ if [ "$CHECK_ONLY" = "1" ]; then python3 -c " import json, os d = json.load(open('$WORK/stack.json')) -assert d['stack']['name'] == 'static-assets', f\"expected static-assets, got {d['stack']['name']}\" -assert len(d['resources']) >= 1 +assert d['stack']['name'], 'stack name missing' +assert len(d['resources']) >= 1, 'expected at least 1 resource' tf_dir = 'terraform/spike' for f in ('main.tf', 'terraform.tf', 'providers.tf'): assert os.path.isfile(os.path.join(tf_dir, f)), f'{f} missing' main = open(os.path.join(tf_dir, 'main.tf')).read() -assert 'aws_s3_bucket' in main -assert 'acdl-spike-bucket' in main -assert 'versioning' in main +assert len(main) > 0, 'main.tf is empty' tf = open(os.path.join(tf_dir, 'terraform.tf')).read() assert 'backend' in tf assert 'required_version' in tf prov = open(os.path.join(tf_dir, 'providers.tf')).read() assert 'provider \"aws\"' in prov -print('adapter output: OK') +print(f\"adapter output: OK ({d['stack']['name']}, {len(d['resources'])} resource(s))\") " echo "" echo "=== PLATFORM CHECK OK ==="