MCPcopy Index your code
hub / github.com/rilldata/rill / NewUserWithDomain

Method NewUserWithDomain

admin/testadmin/testadmin.go:242–246  ·  view source on GitHub ↗

NewUserWithDomain creates a new user with a random email with the given email domain in the fixture's admin service.

(t *testing.T, domain string)

Source from the content-addressed store, hash-verified

240
241// NewUserWithDomain creates a new user with a random email with the given email domain in the fixture's admin service.
242func (f *Fixture) NewUserWithDomain(t *testing.T, domain string) (*database.User, *client.Client) {
243 data := randomBytes()
244 emailAddr := fmt.Sprintf("test-%x@%s", data, domain)
245 return f.NewUserWithEmail(t, emailAddr)
246}
247
248// NewUserWithEmail creates a new user with the given email in the fixture's admin service.
249func (f *Fixture) NewUserWithEmail(t *testing.T, emailAddr string) (*database.User, *client.Client) {

Callers 3

NewUserMethod · 0.95
NewSuperuserMethod · 0.95
TestRBACFunction · 0.80

Calls 2

NewUserWithEmailMethod · 0.95
randomBytesFunction · 0.85

Tested by 1

TestRBACFunction · 0.64