Signed-off-by: Tibor Vass <tibor@docker.com>
This commit is contained in:
Tibor Vass 2019-08-26 20:30:57 +00:00
parent 8b40da168b
commit 925e407c7b
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()
}