Skip to content

Commit a779cac

Browse files
fix oidc test
1 parent d9757b8 commit a779cac

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

utils/fetch_oidc_token_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,8 @@ func TestGetDSNFromOIDC(t *testing.T) {
284284
t.Setenv("GITHUB_ACTIONS", "true")
285285
// ACTIONS_ID_TOKEN_REQUEST_TOKEN is missing
286286
t.Setenv("ACTIONS_ID_TOKEN_REQUEST_URL", "url")
287+
// make sure this is missing in when running on github actions too
288+
os.Unsetenv("ACTIONS_ID_TOKEN_REQUEST_TOKEN")
287289
t.Cleanup(func() {
288290
os.Unsetenv("GITHUB_ACTIONS")
289291
os.Unsetenv("ACTIONS_ID_TOKEN_REQUEST_URL")
@@ -300,6 +302,7 @@ func TestGetDSNFromOIDC(t *testing.T) {
300302
t.Run("error_github_actions_env_vars_missing_url", func(t *testing.T) {
301303
t.Setenv("GITHUB_ACTIONS", "true")
302304
t.Setenv("ACTIONS_ID_TOKEN_REQUEST_TOKEN", "token")
305+
os.Unsetenv("ACTIONS_ID_TOKEN_REQUEST_URL")
303306
// ACTIONS_ID_TOKEN_REQUEST_URL is missing
304307
t.Cleanup(func() {
305308
os.Unsetenv("GITHUB_ACTIONS")

0 commit comments

Comments
 (0)