New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix failing cache invalidation tests #1302

Merged
merged 1 commit into from Feb 7, 2018

Conversation

Projects
None yet
2 participants
@kuychaco
Member

kuychaco commented Feb 7, 2018

Use repo fixture with multiple commits for tests that check HEAD~

/ cc @daviwil

@kuychaco kuychaco requested a review from smashwilson Feb 7, 2018

@smashwilson

This comment has been minimized.

Member

smashwilson commented Feb 7, 2018

Looking into this a little, I believe these were passing before because the Error was consistent:

{ key: 'getFilePatchForPath {staged, amending} subdir-1/b.txt',
  aSync: 
    { Error
      at new GitError (/Users/smashwilson/src/atom-github/lib/git-shell-out-strategy.js:32:18)
      at /Users/smashwilson/src/atom-github/lib/git-shell-out-strategy.js:272:23
      at Generator.next (<anonymous>)
      at step (/Users/smashwilson/src/atom-github/lib/git-shell-out-strategy.js:20:1)
      at /Users/smashwilson/src/atom-github/lib/git-shell-out-strategy.js:20:1
      at <anonymous>
    code: 128,
    stdErr: 'fatal: bad revision \'HEAD~\'\n',
    stdOut: '',
    command: 'git -c color.ui=false -c color.status=false -c color.showBranch=false -c color.diff=false -c color.branch=false diff --no-prefix --no-ext-diff --no-renames --diff-filter=u --staged HEAD~ -- subdir-1/b.txt in /private/var/folders/sm/dnqg538d05bb0xmsf4z9vrvc0000gn/T/git-fixture-11817-12625-wa5yr6.qea5' },
 bSync: 
  { Error
      at new GitError (/Users/smashwilson/src/atom-github/lib/git-shell-out-strategy.js:32:18)
      at /Users/smashwilson/src/atom-github/lib/git-shell-out-strategy.js:272:23
      at Generator.next (<anonymous>)
      at step (/Users/smashwilson/src/atom-github/lib/git-shell-out-strategy.js:20:1)
      at /Users/smashwilson/src/atom-github/lib/git-shell-out-strategy.js:20:1
      at <anonymous>
    code: 128,
    stdErr: 'fatal: bad revision \'HEAD~\'\n',
    stdOut: '',
    command: '

The comparisons are done with lodash's toEqual. I'm wondering if we're seeing version drift in lodash.toequal and a change in how strictly it compares Error objects?

(It'd be awfully nice to get apm using a version of npm that respects package-lock.json files...)

@smashwilson smashwilson merged commit b0baaeb into master Feb 7, 2018

3 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@smashwilson smashwilson deleted the ku-fix-cache-invalidation-specs branch Feb 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment