Closed tschuy closed 8 years ago
getJournals
(in /mayday.go
) has no tests, and that 78% is only for the mayday
package, not main
fwiw. It might be nice to make main
have no code other than the command/file defintions, and move getJournals
into the sorta-plugin architecture I described in #13.
This might be a silly level of making things modular, but we could even have main
load the list of files to copy, commands to run, and plugins to run from a config file depending on how abstract we want to get.
Overall, LGTM. Curious from @colhom about the line comments above.
@tschuy it makes the diff more readable if the actual dependency shuffling happens entirely in it's own commit, so you don't have to ever look at the vendored dependency diff when reviewing
@colhom ah yeah, that would've been good.
@brianredbeard I've updated file_test.go
, it should work on pretty much anything now.
@tschuy yeah you're right, all the changes were godep --> vendor or directly related, good enough for me.
I'd really like to see mayday.File
keep pointers to files as io.ReadCloser
s. When state is expressed as a path string referring to an arbitrary file on disk, you're not really doing unit tests anymore.
Okay, I'll look into getting mayday.File
moved over to ReadCloser
s. Is this something I should do for this PR, or save it for another?
@tschuy up to you and how gnarly the refactor is (first pass says not very)
Ok, this should be good now, I've refactored a little to use ReadCloser
s.
@colhom @brianredbeard
Changes:
Godeps/
, addvendor/
mayday_test.go
: contains the test setup/teardown. Givenmayday.go
exists and this doesn't test that, is this perhaps not the right place to put this? What should the setup file be called?file_test
,command_test
: Are these tests comprehensive enough?./build
: removeGOPATH
export. Is this alright? It works on Travis ¯_(ツ)_/¯github.com/coreos/mayday/mayday
!