Closed notjosh closed 8 years ago
Oh, huh, now that I look at it closer, that's only causing it to swallow the error via cork
and (quietly) bail on the test, and therefore skip assertions. False greens are the worst greens.
Hmm, so I guess two issues now. I'll close this, but in case anyone stumbles over it in future, the error that was hidden was:
Could not set up API to Code Review site for Danger
For Danger to run on this project, you need to expose a set of following the ENV vars:
- GitHub: DANGER_GITHUB_API_TOKEN
- GitLab: DANGER_GITLAB_API_TOKEN
- BitbucketServer: DANGER_BITBUCKETSERVER_USERNAME, DANGER_BITBUCKETSERVER_PASSWORD, DANGER_BITBUCKETSERVER_HOST
- BitbucketCloud: DANGER_BITBUCKETCLOUD_USERNAME, DANGER_BITBUCKETCLOUD_PASSWORD
Found these keys in your ENV: HAS_JOSH_K_SEAL_OF_APPROVAL, TRAVIS_PULL_REQUEST, TRAVIS_REPO_SLUG, TRAVIS_COMMIT_RANGE, DANGER_GITHUB_API_TOKEN.
DANGER_GITHUB_API_TOKEN
appears there in both sections so I'm not sure why it's upset. But I'll submit a patch over at danger/danger to get the error visible.
Okay, the error occurs when your plugin doesn't have a git origin. To solve it, simply (even if temporarily) run:
git remote add origin git@github.com:example/foobar.git
And your tests will continue to work :)
I wonder if we should add a LOC checking for that in the spec helper and billing out?
That's a reasonable solution to it for now. I'll get to it later, if you don't first. Ideally you wouldn't need a git origin just to run tests, but that's a PR for another day.
'allo. Another huge PR :) This one's marginally more important than just a typo though.
Before this diff, I'd get errors like:
And nobody wants that.
But looking at https://github.com/danger/danger/blob/master/spec/spec_helper.rb#L66-L69 gave me the hint that it was an erroneous template.
Now I'm getting all kinds of* green in my shell with tests passing, and it's a happy day.
(*one kind of)