From 64b0d65ff0ab1fd6e179b0b90b76a4422fa3be28 Mon Sep 17 00:00:00 2001 From: Aidan Daly Date: Thu, 7 May 2026 17:40:56 -0400 Subject: [PATCH 1/2] fix(payments): use RUNTIME_ROLE_ARN with pytest.skip for CP integ tests Replace hardcoded dummy role ARN with env var lookup matching the pattern used by other integ test groups (runtime, gateway, etc.). Tests skip gracefully when RUNTIME_ROLE_ARN is not set. --- .github/workflows/integration-testing.yml | 2 +- tests_integ/payments/test_payment_client.py | 19 +++++-------------- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/.github/workflows/integration-testing.yml b/.github/workflows/integration-testing.yml index 917110a7..37c0e7f4 100644 --- a/.github/workflows/integration-testing.yml +++ b/.github/workflows/integration-testing.yml @@ -156,7 +156,7 @@ jobs: - group: payments path: tests_integ/payments timeout: 15 - extra-deps: "strands-agents" + extra-deps: "strands-agents strands-agents-tools" ignore: "" steps: - name: Configure Credentials diff --git a/tests_integ/payments/test_payment_client.py b/tests_integ/payments/test_payment_client.py index eec12c53..e4cd3233 100644 --- a/tests_integ/payments/test_payment_client.py +++ b/tests_integ/payments/test_payment_client.py @@ -64,21 +64,14 @@ class TestPaymentClientControlPlane: def setup_class(cls): """Set up test environment.""" cls.region = os.environ.get("BEDROCK_TEST_REGION", "us-west-2") - cls.role_arn = os.environ.get( - "TEST_PAYMENT_ROLE_ARN", - "arn:aws:iam::123456789012:role/bedrock-payment-role", - ) + cls.role_arn = os.environ.get("RUNTIME_ROLE_ARN") + if not cls.role_arn: + pytest.skip("RUNTIME_ROLE_ARN must be set") cls.client = PaymentClient(region_name=cls.region) - # Use timestamp with microseconds for uniqueness cls.test_prefix = f"t{int(time.time() * 1000000)}" cls.created_managers = [] cls.created_connectors = [] - cls.role_arn = os.environ.get( - "TEST_PAYMENT_ROLE_ARN", - "arn:aws:iam::123456789012:role/bedrock-payment-role", - ) - @classmethod @classmethod def teardown_class(cls): """Clean up test resources.""" @@ -285,10 +278,8 @@ def setup_class(cls): cls.api_key_secret = os.environ.get("PAYMENT_TEST_API_KEY_SECRET") cls.wallet_secret = os.environ.get("PAYMENT_TEST_WALLET_SECRET") cls.skip_tests = not (cls.api_key_secret and cls.wallet_secret) - cls.role_arn = os.environ.get( - "TEST_PAYMENT_ROLE_ARN", - "arn:aws:iam::123456789012:role/bedrock-payment-role", - ) + cls.role_arn = os.environ.get("RUNTIME_ROLE_ARN") + cls.skip_tests = cls.skip_tests or not cls.role_arn @classmethod def teardown_class(cls): From aa202a4de7649ce3b984d2b9c69bb37db49f6d82 Mon Sep 17 00:00:00 2001 From: Aidan Daly Date: Thu, 7 May 2026 17:51:36 -0400 Subject: [PATCH 2/2] ci: retrigger CI after IAM policy updates