From a5282fa128e12322c3b6251ebbec4e187bbfa866 Mon Sep 17 00:00:00 2001 From: Tibor Vass Date: Mon, 26 Aug 2019 20:30:57 +0000 Subject: [PATCH] cleanup Signed-off-by: Tibor Vass (cherry picked from commit 925e407c7bec78416b2616ca22a35f6b8abef5e1) Signed-off-by: Sebastiaan van Stijn --- internal/test/fakegit/fakegit.go | 3 +-- internal/test/fakestorage/storage.go | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) 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() }