MCPcopy Create free account
hub / github.com/rilldata/rill / NewSuperuser

Method NewSuperuser

admin/testadmin/testadmin.go:234–239  ·  view source on GitHub ↗

NewSuperuser creates a new user with superuser permission in the fixture's admin service.

(t *testing.T)

Source from the content-addressed store, hash-verified

232
233// NewSuperuser creates a new user with superuser permission in the fixture's admin service.
234func (f *Fixture) NewSuperuser(t *testing.T) (*database.User, *client.Client) {
235 u, c := f.NewUserWithDomain(t, "test-superuser.com")
236 err := f.Admin.DB.UpdateSuperuser(t.Context(), u.ID, true)
237 require.NoError(t, err)
238 return u, c
239}
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) {

Callers 1

TestUserFunction · 0.80

Calls 3

NewUserWithDomainMethod · 0.95
UpdateSuperuserMethod · 0.65
ContextMethod · 0.65

Tested by 1

TestUserFunction · 0.64