Skip to content

Commit ae48554

Browse files
committed
remove defaultTrue
1 parent f544d3e commit ae48554

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

internal/common/autogen/handle_operations.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ func addError(d *diag.Diagnostics, opName, errSummary string, err error) {
205205
}
206206

207207
// callAPIWithBody makes a request to the API with the given request body and returns the response body.
208-
// It is used for POST, PUT, PATCH, and DELETE with static content.
208+
// It is used for POST, PUT, PATCH and DELETE with static content.
209209
func callAPIWithBody(ctx context.Context, client *config.MongoDBClient, callParams *config.APICallParams, bodyReq []byte) ([]byte, *http.Response, error) {
210210
apiResp, err := client.UntypedAPICall(ctx, callParams, bodyReq)
211211
if err != nil {

tools/codegen/codespec/config_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package codespec_test
33
import (
44
"testing"
55

6+
"github.com/mongodb/terraform-provider-mongodbatlas/internal/common/conversion"
67
"github.com/mongodb/terraform-provider-mongodbatlas/tools/codegen/codespec"
78
"github.com/stretchr/testify/assert"
89
)
@@ -91,8 +92,6 @@ func TestApplyTimeoutTransformation(t *testing.T) {
9192
}
9293

9394
func TestApplyDeleteOnCreateTimeoutTransformation(t *testing.T) {
94-
defaultTrue := true
95-
9695
tests := map[string]struct {
9796
inputOperations codespec.APIOperations
9897
shouldAddDeleteOnCreateTimeout bool
@@ -170,7 +169,7 @@ func TestApplyDeleteOnCreateTimeoutTransformation(t *testing.T) {
170169
expectedAttr := codespec.Attribute{
171170
TFSchemaName: "delete_on_create_timeout",
172171
TFModelName: "DeleteOnCreateTimeout",
173-
Bool: &codespec.BoolAttribute{Default: &defaultTrue},
172+
Bool: &codespec.BoolAttribute{Default: conversion.Pointer(true)},
174173
Description: &description,
175174
ReqBodyUsage: codespec.OmitAlways,
176175
CreateOnly: true,

0 commit comments

Comments
 (0)