diff --git a/internal/test/fakegit/fakegit.go b/internal/test/fakegit/fakegit.go index 6062e0988b..30de769743 100644 --- a/internal/test/fakegit/fakegit.go +++ b/internal/test/fakegit/fakegit.go @@ -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() } diff --git a/internal/test/fakestorage/storage.go b/internal/test/fakestorage/storage.go index 03bd09cdf0..e229fd0813 100644 --- a/internal/test/fakestorage/storage.go +++ b/internal/test/fakestorage/storage.go @@ -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() }