-
Notifications
You must be signed in to change notification settings - Fork 237
Conversation
integration tests run over 3x faster 👍
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
@@ -0,0 +1,62 @@ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add some unit tests for this file?
util/file_cache_test.go
Outdated
} | ||
} | ||
|
||
func TestMain(m *testing.M) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't need a TestMain function, it's a bit of an anti-pattern now with subtests.
util/file_cache_test.go
Outdated
defer os.RemoveAll(cacheDir) | ||
c, err := cache.NewFileCache(cacheDir) | ||
if err != nil { | ||
fmt.Printf(err.Error()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be a t.Fatal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whoops yes meant to change to that, this was originally in TestMain so we didn't have a testing.T
Looks like you need gazelle then you're done. |
slightly modified version of #102
adds support for disabling cache through CLI, and provides interface for adding other cache implementations later on (i.e. in-memory caching)
cc @dlorenc