Skip to content

Commit 0c3df9c

Browse files
authored
fix: update types to match published API types (#214)
1 parent 46a0280 commit 0c3df9c

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

internal/provider/pooler_data_source_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ func TestAccPoolerDataSource(t *testing.T) {
2424
JSON([]api.SupavisorConfigResponse{{
2525
DatabaseType: api.PRIMARY,
2626
ConnectionString: poolerUrl,
27-
DefaultPoolSize: Ptr(float32(15)),
28-
MaxClientConn: Ptr(float32(200)),
27+
DefaultPoolSize: Ptr(int(15)),
28+
MaxClientConn: Ptr(int(200)),
2929
PoolMode: api.SupavisorConfigResponsePoolModeTransaction,
3030
}})
3131
// Run test

internal/provider/project_resource.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,14 +180,14 @@ func (r *ProjectResource) ImportState(ctx context.Context, req resource.ImportSt
180180
}
181181

182182
func createProject(ctx context.Context, data *ProjectResourceModel, client *api.ClientWithResponses) diag.Diagnostics {
183-
body := api.V1CreateProjectBody{
183+
body := api.V1CreateProjectBodyDto{
184184
OrganizationId: data.OrganizationId.ValueString(),
185185
Name: data.Name.ValueString(),
186186
DbPass: data.DatabasePassword.ValueString(),
187-
Region: api.V1CreateProjectBodyRegion(data.Region.ValueString()),
187+
Region: api.V1CreateProjectBodyDtoRegion(data.Region.ValueString()),
188188
}
189189
if !data.InstanceSize.IsNull() {
190-
body.DesiredInstanceSize = Ptr(api.DesiredInstanceSize(data.InstanceSize.ValueString()))
190+
body.DesiredInstanceSize = Ptr(api.V1CreateProjectBodyDtoDesiredInstanceSize(data.InstanceSize.ValueString()))
191191
}
192192

193193
httpResp, err := client.V1CreateAProjectWithResponse(ctx, body)

internal/provider/settings_resource_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,21 +219,21 @@ func TestAccSettingsResource(t *testing.T) {
219219
Reply(http.StatusOK).
220220
JSON(api.AuthConfigResponse{
221221
SiteUrl: Ptr("http://localhost:3000"),
222-
JwtExp: Ptr(float32(3600)),
222+
JwtExp: Ptr(int(3600)),
223223
})
224224
gock.New("https://api.supabase.com").
225225
Patch("/v1/projects/mayuaycdtijbctgqbycg/config/auth").
226226
Reply(http.StatusOK).
227227
JSON(api.AuthConfigResponse{
228228
SiteUrl: Ptr("http://localhost:3000"),
229-
JwtExp: Ptr(float32(1800)),
229+
JwtExp: Ptr(int(1800)),
230230
})
231231
gock.New("https://api.supabase.com").
232232
Get("/v1/projects/mayuaycdtijbctgqbycg/config/auth").
233233
Reply(http.StatusOK).
234234
JSON(api.AuthConfigResponse{
235235
SiteUrl: Ptr("http://localhost:3000"),
236-
JwtExp: Ptr(float32(1800)),
236+
JwtExp: Ptr(int(1800)),
237237
})
238238
// Run test
239239
resource.Test(t, resource.TestCase{

0 commit comments

Comments
 (0)