Skip to content

Skipping system tests when credentials env. var is unset. - #3475

Merged
dhermes merged 1 commit into
googleapis:masterfrom
dhermes:fail-tests-without-creds
Jun 29, 2017
Merged

Skipping system tests when credentials env. var is unset.#3475
dhermes merged 1 commit into
googleapis:masterfrom
dhermes:fail-tests-without-creds

Conversation

@dhermes

Copy link
Copy Markdown
Contributor

This is labeled "don't merge" because it is wrong in it's current state.

So @lukesneeringer@tseaver@jonparrott WDYT the "correct" form should be? We don't want it to raise on PRs, we want it to gracefully do nothing. Otherwise, this is a helpful message and status for people running tests locally with a "bad" setup.

@dhermesdhermes added build do not merge Indicates a pull request not ready for merge, due to either quality or timing. labels Jun 5, 2017
@googlebotgooglebot added the cla: yes This human has signed the Contributor License Agreement. label Jun 5, 2017
Comment threadbigquery/nox.py Outdated
if not os.environ.get('GOOGLE_APPLICATION_CREDENTIALS', ''):
return
raise nox.command.CommandFailed(
reason='Credentials must be set via environment variable.')

This comment was marked as spam.

This comment was marked as spam.

@lukesneeringer

lukesneeringer commented Jun 13, 2017

Copy link
Copy Markdown
Contributor

Thoughts on this (sorry for the delay):

  • It is totally possible to read one of the CircleCI / AppVeyor pull request variables and using those as the basis to skip. (I am less convinced it is a good idea.)
  • I am not as convinced as @dhermes that you always want to run system tests in local testing. In particular, I would expect external contributors generally do not want to do so, or want to run them for only the package they are working on.
  • We could add some kind of skipped state to nox. It would be far more valuable for us to report "5 sessions passed, 2 skipped" than "7 sessions passed". I think that would be my preference. It also follows @jonparrott's desire to "generally follow py.test as much as possible" as this is definitely a well-understood testing feature. It is also a useful feature lacking in tox. :-)

@theacodes

theacodes commented Jun 13, 2017 via email

Copy link
Copy Markdown
Contributor

@lukesneeringer

Copy link
Copy Markdown
Contributor

@dhermes Does that work for you?

@dhermes

Copy link
Copy Markdown
ContributorAuthor

Yes I am OK with that. I don't have bandwidth to add that feature to nox though

@theacodes

theacodes commented Jun 13, 2017 via email

Copy link
Copy Markdown
Contributor

@dhermes

Copy link
Copy Markdown
ContributorAuthor

Donezors: wntrblm/nox#34

@dhermes
dhermesforce-pushed the fail-tests-without-creds branch from 6410981 to ab0bc35CompareJune 28, 2017 17:23
@dhermesdhermes removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Jun 28, 2017
@dhermes

Copy link
Copy Markdown
ContributorAuthor

I just removed the "do not merge" label.

@jonparrott I think this is read to go. PTAL?

@lukesneeringer ISTM that we'll need our CircleCI image to have the latest version of nox-automation, what's the best way to go about that?

@duggelz I have intentionally avoided linked to CONTRIBUTING.rst for the time being (though I think it's a great idea). This is because the doc is months out-of-date.

@dhermes

Copy link
Copy Markdown
ContributorAuthor

Update: currently waiting on @lukesneeringer to rebuild our Docker image, so we can ditch the pip install --upgrade nox-automation that I added.

(It's not a big hurry to merge this.)

@dhermesdhermes changed the title Failing system tests when credentials env. var is unset.Skipping system tests when credentials env. var is unset.Jun 28, 2017
@dhermes
dhermesforce-pushed the fail-tests-without-creds branch from 6519b5c to 2685c36CompareJune 29, 2017 17:19
@dhermes

Copy link
Copy Markdown
ContributorAuthor

OK @lukesneeringer got us googleapis/nox:0.17.0 so this thing is ready to go once green.

@dhermes
dhermes merged commit b9cb6d1 into googleapis:masterJun 29, 2017
@dhermes
dhermes deleted the fail-tests-without-creds branch June 29, 2017 17:56
@dhermesdhermes mentioned this pull request Jul 14, 2017
landrito pushed a commit to landrito/google-cloud-python that referenced this pull request Aug 21, 2017
landrito pushed a commit to landrito/google-cloud-python that referenced this pull request Aug 22, 2017
landrito pushed a commit to landrito/google-cloud-python that referenced this pull request Aug 22, 2017
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yesThis human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@dhermes@lukesneeringer@theacodes@tseaver@duggelz@googlebot