(t *testing.T)
| 8 | ) |
| 9 | |
| 10 | func 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 | |
| 49 | func TestProjectDeploy_ConfigV3_WithSeeds(t *testing.T) { |
| 50 | port, teardown := testutil.StartHasura(t, testutil.HasuraDockerImage) |
nothing calls this directly
no test coverage detected