(t *testing.T)
| 86 | } |
| 87 | |
| 88 | func 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 | |
| 127 | func TestProjectDeploy_ConfigV2_WithSeeds(t *testing.T) { |
| 128 | port, teardown := testutil.StartHasura(t, testutil.HasuraDockerImage) |
nothing calls this directly
no test coverage detected