Skip to content
Open
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
6 changes: 5 additions & 1 deletion tests/test-idle-wake-policy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
# - ec2:StartInstances stays limited to the one instance ARN
#
# No AWS required. Run standalone or via CI (discovered by pack-tests.yml).
# Note: pack-tests.yml runs only when its path filters match. Its filters do
# not include bootstraps/**, so a change to install-idle.sh alone does not
# start this test in CI. Run it by hand when you change that file.
set -euo pipefail

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
Expand Down Expand Up @@ -70,8 +73,9 @@ for s in stmts:
actions = as_list(s.get("Action", []))
resources = as_list(s.get("Resource", []))
describes = [a for a in actions if a.startswith("ec2:Describe")]
if describes:
if "ec2:DescribeInstanceStatus" in actions:
describe_seen = True
if describes:
out(resources == ["*"],
f"{', '.join(describes)} uses Resource \"*\" (got {resources})")
if "ec2:StartInstances" in actions:
Expand Down
Loading