MCPcopy
hub / github.com/hasura/graphql-engine / TestProjectDeploy_ConfigV3

Function TestProjectDeploy_ConfigV3

cli/pkg/deploy/project_deploy_test.go:10–47  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

8)
9
10func TestProjectDeploy_ConfigV3(t *testing.T) {
11 port, teardown := testutil.StartHasura(t, testutil.HasuraDockerImage)
12 hgeEndpoint := fmt.Sprintf("http://localhost:%s", port)
13 defer teardown()
14 type fields struct {
15 projectDirectory string
16 endpointString string
17 }
18 tests := []struct {
19 name string
20 fields fields
21 want string
22 wantErr bool
23 assertErr require.ErrorAssertionFunc
24 }{
25 {
26 "can deploy project from V3 config",
27 fields{
28 projectDirectory: "testdata/projectV3",
29 endpointString: hgeEndpoint,
30 },
31 ``,
32 false,
33 require.NoError,
34 },
35 }
36 for _, tt := range tests {
37 t.Run(tt.name, func(t *testing.T) {
38 p, err := NewProjectDeploy(tt.fields.projectDirectory, WithAdminSecret(testutil.TestAdminSecret), WithEndpoint(tt.fields.endpointString))
39 require.NoError(t, err)
40 err = p.Deploy()
41 tt.assertErr(t, err)
42 if tt.wantErr {
43 return
44 }
45 })
46 }
47}
48
49func TestProjectDeploy_ConfigV3_WithSeeds(t *testing.T) {
50 port, teardown := testutil.StartHasura(t, testutil.HasuraDockerImage)

Callers

nothing calls this directly

Calls 5

DeployMethod · 0.95
NewProjectDeployFunction · 0.85
WithAdminSecretFunction · 0.70
WithEndpointFunction · 0.70
RunMethod · 0.65

Tested by

no test coverage detected