Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 925e407c7b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Tibor Vass 2019-08-26 20:30:57 +00:00 committed by Sebastiaan van Stijn
parent da96e5c27b
commit a5282fa128
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
2 changed files with 2 additions and 4 deletions

View File

@ -63,8 +63,7 @@ func (g *FakeGit) Close() {
}
// New create a fake git server that can be used for git related tests
func New(cc interface{}, name string, files map[string]string, enforceLocalServer bool) *FakeGit {
c := cc.(testingT)
func New(c testingT, name string, files map[string]string, enforceLocalServer bool) *FakeGit {
if ht, ok := c.(test.HelperT); ok {
ht.Helper()
}

View File

@ -56,8 +56,7 @@ func SetTestEnvironment(env *environment.Execution) {
}
// New returns a static file server that will be use as build context.
func New(tt interface{}, dir string, modifiers ...func(*fakecontext.Fake) error) Fake {
t := tt.(testingT)
func New(t testingT, dir string, modifiers ...func(*fakecontext.Fake) error) Fake {
if ht, ok := t.(test.HelperT); ok {
ht.Helper()
}