Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

WIP: HashFromNode and VerifyDepTree #959

Merged
merged 36 commits into from
Aug 17, 2017
Merged
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
84b3567
HashFromNode and VerifyDepTree
karrick Jul 15, 2017
ae2c30e
added package declarations at top of all test go files
karrick Aug 5, 2017
1a76ff6
refactor based on feedback from @sdboyer
karrick Aug 7, 2017
66fe4eb
writes NULL byte after writing to hash
karrick Aug 7, 2017
5c97180
added copywrite notification for dummy files
karrick Aug 7, 2017
546d65f
test scaffolding dirs and files have meaningful names
karrick Aug 7, 2017
f1d5d85
use filepath function to locate testdata_digest directory
karrick Aug 7, 2017
b6d16e1
convert CRLF to LF when hashing file contents
karrick Aug 8, 2017
9a7209d
added copywrite notification for digest{,_test}.go
karrick Aug 8, 2017
581e51a
fixes `gosimple $PKGS` lint suggestion
karrick Aug 8, 2017
a298630
lineEndingReader is more simplified than lineEndingWriterTo
karrick Aug 8, 2017
f0b532d
bug fixes and better testing for lineEndingReader
karrick Aug 8, 2017
911fda4
TestScaffolding prints testdata_digest directory
karrick Aug 8, 2017
ecbbf03
pathnames returned as keys to VerifyDepTree normalized with filepath.…
karrick Aug 8, 2017
0f7b419
continue printing VerifyDepTree response
karrick Aug 8, 2017
443fcd3
comments and some logic changes
karrick Aug 8, 2017
8575040
normalize pathnames as keys for expected digests map
karrick Aug 9, 2017
541b3f8
no longer dumps status output during testing
karrick Aug 9, 2017
0a01713
no longer dumps status output during testing
karrick Aug 9, 2017
8a0c365
two loop solution
karrick Aug 12, 2017
cba6ebe
O(n) loop for CRLF -> LF translation in lineEndingReader
karrick Aug 12, 2017
59a1046
typos
karrick Aug 12, 2017
c5be3d8
NotInLock loop more easy to read
karrick Aug 13, 2017
87959d0
DigestFromPathname -> DigestFromDirectory
karrick Aug 13, 2017
29b1709
sets element in backing array to nil after popping off queue
karrick Aug 13, 2017
17e7c9d
comments updated
karrick Aug 13, 2017
0df696c
code cleanup and documentation updates
karrick Aug 13, 2017
f02d479
VerifyDepTree reports all NotInLock file system nodes
karrick Aug 14, 2017
e9ff6b2
additional test cases
karrick Aug 15, 2017
fbe5d64
VerifyDepTree test displays actual hash values when got status does n…
karrick Aug 15, 2017
48cd664
DirWalk
karrick Aug 15, 2017
845c95e
repeatedly uses io.CopyBuffer with pre-allocated buffer
karrick Aug 15, 2017
9a883e8
DigestFromDirectory uses DirWalk
karrick Aug 15, 2017
a252c36
public type has properly formatted documentation
karrick Aug 15, 2017
83ad7c6
DigestFromDirectory handles Lstat error from DirWalk
karrick Aug 15, 2017
a9bb8cd
removed constant no longer being used
karrick Aug 15, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use filepath function to locate testdata_digest directory
  • Loading branch information
karrick committed Aug 7, 2017
commit f1d5d8503f0917aff63e32cdd9103f87fb6cac08
3 changes: 2 additions & 1 deletion internal/gps/pkgtree/digest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ func getTestdataVerifyRoot(t *testing.T) string {
if err != nil {
t.Fatal(err)
}
return filepath.Join(cwd, "..", "testdata_digest")
parent, _ := filepath.Split(cwd)
return filepath.Join(parent, "testdata_digest")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this + the preceding line can be reduced to

return filepath.Join(filepath.Dir(cwd), "testdata_digest")

no?

}

func TestDigestFromPathnameWithFile(t *testing.T) {
Expand Down