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

Function TestProjectDeploy_ConfigV2

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

Source from the content-addressed store, hash-verified

86}
87
88func TestProjectDeploy_ConfigV2(t *testing.T) {
89 port, teardown := testutil.StartHasura(t, testutil.HasuraDockerImage)
90 hgeEndpoint := fmt.Sprintf("http://localhost:%s", port)
91 defer teardown()
92 type fields struct {
93 projectDirectory string
94 endpointString string
95 }
96 tests := []struct {
97 name string
98 fields fields
99 want string
100 wantErr bool
101 assertErr require.ErrorAssertionFunc
102 }{
103 {
104 "can deploy project from V2 config",
105 fields{
106 projectDirectory: "testdata/projectV2",
107 endpointString: hgeEndpoint,
108 },
109 ``,
110 false,
111 require.NoError,
112 },
113 }
114 for _, tt := range tests {
115 t.Run(tt.name, func(t *testing.T) {
116 p, err := NewProjectDeploy(tt.fields.projectDirectory, WithAdminSecret(testutil.TestAdminSecret), WithEndpoint(tt.fields.endpointString))
117 require.NoError(t, err)
118 err = p.Deploy()
119 tt.assertErr(t, err)
120 if tt.wantErr {
121 return
122 }
123 })
124 }
125}
126
127func TestProjectDeploy_ConfigV2_WithSeeds(t *testing.T) {
128 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