MCPcopy
hub / github.com/purpleidea/mgmt / fakeUserInit

Function fakeUserInit

engine/resources/user_test.go:144–149  ·  view source on GitHub ↗

fakeUserInit returns the minimal *engine.Init needed for UserRes.CheckApply.

(t *testing.T)

Source from the content-addressed store, hash-verified

142
143// fakeUserInit returns the minimal *engine.Init needed for UserRes.CheckApply.
144func 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.
152func newTestUser(name string, uid, gid uint32, home string) *user.User {

Calls 1

LogfMethod · 0.80

Tested by

no test coverage detected