fakeUserInit returns the minimal *engine.Init needed for UserRes.CheckApply.
(t *testing.T)
| 142 | |
| 143 | // fakeUserInit returns the minimal *engine.Init needed for UserRes.CheckApply. |
| 144 | func fakeUserInit(t *testing.T) *engine.Init { |
| 145 | return &engine.Init{ |
| 146 | Debug: testing.Verbose(), |
| 147 | Logf: func(format string, v ...interface{}) { t.Logf("user: "+format, v...) }, |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | // newTestUser is a small constructor for *user.User with stringified ids. |
| 152 | func newTestUser(name string, uid, gid uint32, home string) *user.User { |
no test coverage detected