(t *testing.T)
| 761 | } |
| 762 | |
| 763 | func TestLoadOAuthCredentialsFromEnvKeepsAppKeyFallbacks(t *testing.T) { |
| 764 | restoreOAuthCredentials(t) |
| 765 | |
| 766 | for _, key := range []string{ |
| 767 | "DROPBOX_PERSONAL_APP_KEY", |
| 768 | "DROPBOX_TEAM_APP_KEY", |
| 769 | "DROPBOX_MANAGE_APP_KEY", |
| 770 | } { |
| 771 | unsetEnvForTest(t, key) |
| 772 | } |
| 773 | |
| 774 | teamAccessAppKey = "team-access-key" |
| 775 | teamManageAppKey = "team-manage-key" |
| 776 | |
| 777 | loadOAuthCredentialsFromEnv() |
| 778 | |
| 779 | if teamManageAppKey != "team-manage-key" { |
| 780 | t.Fatalf("expected team manage app key fallback, got %q", teamManageAppKey) |
| 781 | } |
| 782 | if teamAccessAppKey != "team-access-key" { |
| 783 | t.Fatalf("expected team access app key fallback, got %q", teamAccessAppKey) |
| 784 | } |
| 785 | } |
nothing calls this directly
no test coverage detected