@@ -30,29 +30,43 @@ def redact_oidc_signature(secret_val):
30
30
return secret_val .split ("." )[:- 1 ] + ["SIGNATURE_REMOVED" ]
31
31
32
32
33
- @pytest .mark .skipif (os .environ .get ('K_SERVICE' ) is None , reason = "Cannot run without being in GCP Cloud Run" )
33
+ @pytest .mark .skipif (
34
+ os .environ .get ("K_SERVICE" ) is None ,
35
+ reason = "Cannot run without being in GCP Cloud Run" ,
36
+ )
34
37
def test_oidc_google ():
35
- secret_val = get_secret ("oidc/google/https://bedrock-runtime.us-east-1.amazonaws.com/model/amazon.titan-text-express-v1/invoke" )
38
+ secret_val = get_secret (
39
+ "oidc/google/https://bedrock-runtime.us-east-1.amazonaws.com/model/amazon.titan-text-express-v1/invoke"
40
+ )
36
41
37
42
print (f"secret_val: { redact_oidc_signature (secret_val )} " )
38
43
39
44
40
- @pytest .mark .skipif (os .environ .get ('ACTIONS_ID_TOKEN_REQUEST_TOKEN' ) is None , reason = "Cannot run without being in GitHub Actions" )
45
+ @pytest .mark .skipif (
46
+ os .environ .get ("ACTIONS_ID_TOKEN_REQUEST_TOKEN" ) is None ,
47
+ reason = "Cannot run without being in GitHub Actions" ,
48
+ )
41
49
def test_oidc_github ():
42
- secret_val = get_secret ("oidc/github/https://bedrock-runtime.us-east-1.amazonaws.com/model/amazon.titan-text-express-v1/invoke" )
50
+ secret_val = get_secret (
51
+ "oidc/github/https://bedrock-runtime.us-east-1.amazonaws.com/model/amazon.titan-text-express-v1/invoke"
52
+ )
43
53
44
54
print (f"secret_val: { redact_oidc_signature (secret_val )} " )
45
55
46
56
47
- @pytest .mark .skipif ( os . environ . get ( 'CIRCLE_OIDC_TOKEN' ) is None , reason = "Cannot run without being in a CircleCI Runner" )
57
+ @pytest .mark .skip ( reason = "Cannot run without being in a CircleCI Runner" )
48
58
def test_oidc_circleci ():
49
- secret_val = get_secret ("oidc/circleci/https://bedrock-runtime.us-east-1.amazonaws.com/model/amazon.titan-text-express-v1/invoke" )
59
+ secret_val = get_secret (
60
+ "oidc/circleci/https://bedrock-runtime.us-east-1.amazonaws.com/model/amazon.titan-text-express-v1/invoke"
61
+ )
50
62
51
63
print (f"secret_val: { redact_oidc_signature (secret_val )} " )
52
64
53
65
54
- @pytest .mark .skipif ( os . environ . get ( 'CIRCLE_OIDC_TOKEN_V2' ) is None , reason = "Cannot run without being in a CircleCI Runner" )
66
+ @pytest .mark .skip ( reason = "Cannot run without being in a CircleCI Runner" )
55
67
def test_oidc_circleci_v2 ():
56
- secret_val = get_secret ("oidc/circleci_v2/https://bedrock-runtime.us-east-1.amazonaws.com/model/amazon.titan-text-express-v1/invoke" )
68
+ secret_val = get_secret (
69
+ "oidc/circleci_v2/https://bedrock-runtime.us-east-1.amazonaws.com/model/amazon.titan-text-express-v1/invoke"
70
+ )
57
71
58
72
print (f"secret_val: { redact_oidc_signature (secret_val )} " )
0 commit comments