(t *testing.T, key string)
| 745 | } |
| 746 | |
| 747 | func unsetEnvForTest(t *testing.T, key string) { |
| 748 | t.Helper() |
| 749 | |
| 750 | old, exists := os.LookupEnv(key) |
| 751 | if err := os.Unsetenv(key); err != nil { |
| 752 | t.Fatal(err) |
| 753 | } |
| 754 | t.Cleanup(func() { |
| 755 | if exists { |
| 756 | _ = os.Setenv(key, old) |
| 757 | } else { |
| 758 | _ = os.Unsetenv(key) |
| 759 | } |
| 760 | }) |
| 761 | } |
| 762 | |
| 763 | func TestLoadOAuthCredentialsFromEnvKeepsAppKeyFallbacks(t *testing.T) { |
| 764 | restoreOAuthCredentials(t) |
no outgoing calls
no test coverage detected