Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 925e407c7bec78416b2616ca22a35f6b8abef5e1)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| ... | ... |
@@ -63,8 +63,7 @@ func (g *FakeGit) Close() {
|
| 63 | 63 |
} |
| 64 | 64 |
|
| 65 | 65 |
// New create a fake git server that can be used for git related tests |
| 66 |
-func New(cc interface{}, name string, files map[string]string, enforceLocalServer bool) *FakeGit {
|
|
| 67 |
- c := cc.(testingT) |
|
| 66 |
+func New(c testingT, name string, files map[string]string, enforceLocalServer bool) *FakeGit {
|
|
| 68 | 67 |
if ht, ok := c.(test.HelperT); ok {
|
| 69 | 68 |
ht.Helper() |
| 70 | 69 |
} |
| ... | ... |
@@ -56,8 +56,7 @@ func SetTestEnvironment(env *environment.Execution) {
|
| 56 | 56 |
} |
| 57 | 57 |
|
| 58 | 58 |
// New returns a static file server that will be use as build context. |
| 59 |
-func New(tt interface{}, dir string, modifiers ...func(*fakecontext.Fake) error) Fake {
|
|
| 60 |
- t := tt.(testingT) |
|
| 59 |
+func New(t testingT, dir string, modifiers ...func(*fakecontext.Fake) error) Fake {
|
|
| 61 | 60 |
if ht, ok := t.(test.HelperT); ok {
|
| 62 | 61 |
ht.Helper() |
| 63 | 62 |
} |