Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

Service account tests run slowly if gcloud credentials present #92

Closed
craigcitro opened this issue Dec 16, 2014 · 6 comments
Closed

Service account tests run slowly if gcloud credentials present #92

craigcitro opened this issue Dec 16, 2014 · 6 comments

Comments

@craigcitro
Copy link
Contributor

This is the root cause of the slowness from #89. From the back-and-forth in #85, it looks like the tests happen to pick up existing credentials from the well-known file, which means our tests aren't self-contained (badness), and are slow to boot.

(Moving the gcloud directory is a temporary workaround, but clearly this needs fixed.)

@dhermes
Copy link
Contributor

dhermes commented Dec 16, 2014

Monkey patching _get_well_known_file for those tests seems to be the easiest fix.

@craigcitro
Copy link
Contributor Author

sure -- but we want to make sure _get_well_known_file still has a test. (maybe it does elsewhere, i just haven't looked.)

@dhermes
Copy link
Contributor

dhermes commented Dec 16, 2014

I just meant in that test case, not in the whole suite.

@craigcitro
Copy link
Contributor Author

totes! I'm just curious if there's another test to cover it ;)

On Mon, Dec 15, 2014, 6:38 PM Danny Hermes notifications@github.com wrote:

I just meant in that test case, not in the whole suite.


Reply to this email directly or view it on GitHub
#92 (comment).

@craigcitro
Copy link
Contributor Author

just sat down and skimmed the code; i'm really curious about what's in your ~/.config/gcloud directory. in particular, all the tests validate that the files fetched match some fixed dummy values -- if you are loading values from disk, then either (1) you've got some weird values in your gcloud directory, or (2) we're spending time on something before loading the right files. if it's the latter, i want to know where that time is going.

@craigcitro
Copy link
Contributor Author

turns out this was a red herring -- opening a new issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants