From eb57b2c6d779274e0a43d18a47184a11099f5de6 Mon Sep 17 00:00:00 2001 From: David Manouchehri Date: Fri, 31 May 2024 13:48:52 +0000 Subject: [PATCH] Fix OIDC tests. This should always work, even without IAM set up . --- litellm/tests/test_secret_manager.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/litellm/tests/test_secret_manager.py b/litellm/tests/test_secret_manager.py index f990fed3f19..d18d0ea63d5 100644 --- a/litellm/tests/test_secret_manager.py +++ b/litellm/tests/test_secret_manager.py @@ -54,7 +54,10 @@ def test_oidc_github(): print(f"secret_val: {redact_oidc_signature(secret_val)}") -@pytest.mark.skip(reason="Cannot run without being in a CircleCI Runner") +@pytest.mark.skipif( + os.environ.get("CIRCLE_OIDC_TOKEN") is None, + reason="Cannot run without being in CircleCI Runner", +) def test_oidc_circleci(): secret_val = get_secret( "oidc/circleci/https://bedrock-runtime.us-east-1.amazonaws.com/model/amazon.titan-text-express-v1/invoke" @@ -63,7 +66,10 @@ def test_oidc_circleci(): print(f"secret_val: {redact_oidc_signature(secret_val)}") -@pytest.mark.skip(reason="Cannot run without being in a CircleCI Runner") +@pytest.mark.skipif( + os.environ.get("CIRCLE_OIDC_TOKEN_V2") is None, + reason="Cannot run without being in CircleCI Runner", +) def test_oidc_circleci_v2(): secret_val = get_secret( "oidc/circleci_v2/https://bedrock-runtime.us-east-1.amazonaws.com/model/amazon.titan-text-express-v1/invoke"