Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Fix failing cache invalidation tests #1302

Merged
merged 1 commit into from Feb 7, 2018

Conversation

kuychaco
Copy link
Contributor

@kuychaco kuychaco commented Feb 7, 2018

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

/ cc @daviwil

@smashwilson
Copy link
Contributor

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
@smashwilson smashwilson deleted the ku-fix-cache-invalidation-specs branch February 7, 2018 13:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants