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

Function New

cli/testcli/testcli.go:22–34  ·  view source on GitHub ↗

New creates a new Fixture for the given admin service test fixture and (optional) user access token.

(t *testing.T, adm *testadmin.Fixture, token string)

Source from the content-addressed store, hash-verified

20
21// New creates a new Fixture for the given admin service test fixture and (optional) user access token.
22func New(t *testing.T, adm *testadmin.Fixture, token string) *Fixture {
23 homeDir := t.TempDir()
24 dotRill := dotrill.New(homeDir)
25 require.NoError(t, dotRill.SetDefaultAdminURL(adm.ExternalURL()))
26 if token != "" {
27 require.NoError(t, dotRill.SetAccessToken(token))
28 }
29
30 return &Fixture{
31 Admin: adm,
32 HomeDir: homeDir,
33 }
34}
35
36// NewWithUser is similar to New, but also creates a new user and authenticates the Fixture with a token for that user.
37func NewWithUser(t *testing.T, adm *testadmin.Fixture) *Fixture {

Callers 9

TestManagedDeployFunction · 0.92
TestGithubDeployFunction · 0.92
TestRuntimeDeploymentsFunction · 0.92
TestPrimaryBranchChangeFunction · 0.92
TestTokenFunction · 0.92
TestEmbedOpenFunction · 0.92
TestDeploymentJWTsFunction · 0.92
NewWithUserFunction · 0.70

Calls 5

NewFunction · 0.92
SetDefaultAdminURLMethod · 0.80
ExternalURLMethod · 0.80
SetAccessTokenMethod · 0.80
TempDirMethod · 0.65

Tested by 8

TestManagedDeployFunction · 0.74
TestGithubDeployFunction · 0.74
TestRuntimeDeploymentsFunction · 0.74
TestPrimaryBranchChangeFunction · 0.74
TestTokenFunction · 0.74
TestEmbedOpenFunction · 0.74
TestDeploymentJWTsFunction · 0.74