Closed andrewhood125 closed 7 years ago
@maxjacobson thanks for pointing me to that! I'll take a look!
@maxjacobson updated! 👍
Hmm.. looking at fails.
No safe operator. 😢
Looks like for some reason the ordering of the formatter spec was switched. I wonder if a less strict compare would be better. Is this a flakey spec? Thoughts @maxjacobson ?
I think I know what's happening. The expectation that's not met is here:
-:git => {:head=>"7a36651c654c73e7e9a6dfc9f9fa78c5fe37241e", :committed_at=>1474318896, :branch=>"master"},
+:git => {:head=>"73a72f2142b1dbba41cefa0181b996d856f7ee4b", :committed_at=>1474318896, :branch=>"master"},
The head
is expected to be the latest sha in this compressed repository https://github.com/codeclimate/ruby-test-reporter/blob/master/spec/fixtures/fake_project.tar.gz , but instead, when the test runs on Circle CI, it prefers the value from the environment (because of your change) and fails. When you run the test locally, no CI-specific environment variables are set, so it uses the one from the repository (and passes).
Does that make sense? I think you can probably avoid this failure by stubbing something.
Ah I see it now. I glazed over those shas thinking they were the same 👍 Thanks for highlighting that.
@maxjacobson updated.
@maxjacobson look good to you?
@andrewhood125 hey, thanks for the ping and for working on this. I was about to merge this, but then noticed that my colleague was making a similar change in our new test reporter. After talking it through, I believe this change isn't as thorough as it needs to be. Before merging, we would need to also update this to prefer the CI information for branch
and committed_at
.
I do appreciate your work, and if you'd like to make that change I'll be happy to merge it. But if you're interested, what do you think about trying out our new test reporter (it's in beta and has some additional cool features)? As of today's release, it should already work for your use-case.
👌 got the new test reporter working.
Resolves #189