Skip to content
Snippets Groups Projects
Commit 9de661e7 authored by Niamh Nikali's avatar Niamh Nikali
Browse files

Make NewManagerTesting take any testing type

parent 5686bc0f
No related branches found
No related tags found
No related merge requests found
...@@ -33,9 +33,16 @@ func newManager() *Manager { ...@@ -33,9 +33,16 @@ func newManager() *Manager {
} }
} }
func NewManagerTesting(t *testing.T) *Manager { func NewManagerTesting(i interface{}) *Manager {
if t == nil { switch i.(type) {
jww.FATAL.Panicf("NewMangerTesting is for testing only") case *testing.T:
break
case *testing.M:
break
case *testing.B:
break
default:
jww.FATAL.Panicf("NewManagerTesting is for testing only. Got %T", i)
} }
return newManager() return newManager()
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment