Skip to content

Commit 1503be5

Browse files
committed
update all commented out custom type tests
1 parent 21ffee7 commit 1503be5

18 files changed

+109
-108
lines changed

action/schema/list_nested_attribute_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -373,12 +373,12 @@ func TestListNestedAttributeGetType(t *testing.T) {
373373
},
374374
},
375375
},
376-
// "custom-type": {
377-
// attribute: schema.ListNestedAttribute{
378-
// CustomType: testtypes.ListType{},
379-
// },
380-
// expected: testtypes.ListType{},
381-
// },
376+
"custom-type": {
377+
attribute: schema.ListNestedAttribute{
378+
CustomType: testtypes.ListType{ListType: types.ListType{ElemType: types.StringType}},
379+
},
380+
expected: testtypes.ListType{ListType: types.ListType{ElemType: types.StringType}},
381+
},
382382
}
383383

384384
for name, testCase := range testCases {

action/schema/list_nested_block_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -414,12 +414,12 @@ func TestListNestedBlockType(t *testing.T) {
414414
},
415415
},
416416
},
417-
// "custom-type": {
418-
// block: schema.ListNestedBlock{
419-
// CustomType: testtypes.ListType{},
420-
// },
421-
// expected: testtypes.ListType{},
422-
// },
417+
"custom-type": {
418+
block: schema.ListNestedBlock{
419+
CustomType: testtypes.ListType{ListType: types.ListType{ElemType: types.StringType}},
420+
},
421+
expected: testtypes.ListType{ListType: types.ListType{ElemType: types.StringType}},
422+
},
423423
}
424424

425425
for name, testCase := range testCases {

action/schema/map_attribute_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -228,12 +228,12 @@ func TestMapAttributeGetType(t *testing.T) {
228228
attribute: schema.MapAttribute{ElementType: types.StringType},
229229
expected: types.MapType{ElemType: types.StringType},
230230
},
231-
// "custom-type": {
232-
// attribute: schema.MapAttribute{
233-
// CustomType: testtypes.MapType{},
234-
// },
235-
// expected: testtypes.MapType{},
236-
// },
231+
"custom-type": {
232+
attribute: schema.MapAttribute{
233+
CustomType: testtypes.MapType{MapType: types.MapType{ElemType: types.StringType}},
234+
},
235+
expected: testtypes.MapType{MapType: types.MapType{ElemType: types.StringType}},
236+
},
237237
}
238238

239239
for name, testCase := range testCases {

action/schema/map_nested_attribute_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -373,12 +373,12 @@ func TestMapNestedAttributeGetType(t *testing.T) {
373373
},
374374
},
375375
},
376-
// "custom-type": {
377-
// attribute: schema.MapNestedAttribute{
378-
// CustomType: testtypes.MapType{},
379-
// },
380-
// expected: testtypes.MapType{},
381-
// },
376+
"custom-type": {
377+
attribute: schema.MapNestedAttribute{
378+
CustomType: testtypes.MapType{MapType: types.MapType{ElemType: types.StringType}},
379+
},
380+
expected: testtypes.MapType{MapType: types.MapType{ElemType: types.StringType}},
381+
},
382382
}
383383

384384
for name, testCase := range testCases {

action/schema/set_attribute_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -228,12 +228,12 @@ func TestSetAttributeGetType(t *testing.T) {
228228
attribute: schema.SetAttribute{ElementType: types.StringType},
229229
expected: types.SetType{ElemType: types.StringType},
230230
},
231-
// "custom-type": {
232-
// attribute: schema.SetAttribute{
233-
// CustomType: testtypes.SetType{},
234-
// },
235-
// expected: testtypes.SetType{},
236-
// },
231+
"custom-type": {
232+
attribute: schema.SetAttribute{
233+
CustomType: testtypes.SetType{SetType: types.SetType{ElemType: types.StringType}},
234+
},
235+
expected: testtypes.SetType{SetType: types.SetType{ElemType: types.StringType}},
236+
},
237237
}
238238

239239
for name, testCase := range testCases {

action/schema/set_nested_attribute_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -374,12 +374,12 @@ func TestSetNestedAttributeGetType(t *testing.T) {
374374
},
375375
},
376376
},
377-
// "custom-type": {
378-
// attribute: schema.SetNestedAttribute{
379-
// CustomType: testtypes.SetType{},
380-
// },
381-
// expected: testtypes.SetType{},
382-
// },
377+
"custom-type": {
378+
attribute: schema.SetNestedAttribute{
379+
CustomType: testtypes.SetType{SetType: types.SetType{ElemType: types.StringType}},
380+
},
381+
expected: testtypes.SetType{SetType: types.SetType{ElemType: types.StringType}},
382+
},
383383
}
384384

385385
for name, testCase := range testCases {

action/schema/set_nested_block_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -414,12 +414,12 @@ func TestSetNestedBlockType(t *testing.T) {
414414
},
415415
},
416416
},
417-
// "custom-type": {
418-
// block: schema.SetNestedBlock{
419-
// CustomType: testtypes.SetType{},
420-
// },
421-
// expected: testtypes.SetType{},
422-
// },
417+
"custom-type": {
418+
block: schema.SetNestedBlock{
419+
CustomType: testtypes.SetType{SetType: types.SetType{ElemType: types.StringType}},
420+
},
421+
expected: testtypes.SetType{SetType: types.SetType{ElemType: types.StringType}},
422+
},
423423
}
424424

425425
for name, testCase := range testCases {

ephemeral/schema/list_attribute_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -229,12 +229,12 @@ func TestListAttributeGetType(t *testing.T) {
229229
attribute: schema.ListAttribute{ElementType: types.StringType},
230230
expected: types.ListType{ElemType: types.StringType},
231231
},
232-
// "custom-type": {
233-
// attribute: schema.ListAttribute{
234-
// CustomType: testtypes.ListType{},
235-
// },
236-
// expected: testtypes.ListType{},
237-
// },
232+
"custom-type": {
233+
attribute: schema.ListAttribute{
234+
CustomType: testtypes.ListType{ListType: types.ListType{ElemType: types.StringType}},
235+
},
236+
expected: testtypes.ListType{ListType: types.ListType{ElemType: types.StringType}},
237+
},
238238
}
239239

240240
for name, testCase := range testCases {

ephemeral/schema/list_nested_attribute_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -374,12 +374,12 @@ func TestListNestedAttributeGetType(t *testing.T) {
374374
},
375375
},
376376
},
377-
// "custom-type": {
378-
// attribute: schema.ListNestedAttribute{
379-
// CustomType: testtypes.ListType{},
380-
// },
381-
// expected: testtypes.ListType{},
382-
// },
377+
"custom-type": {
378+
attribute: schema.ListNestedAttribute{
379+
CustomType: testtypes.ListType{ListType: types.ListType{ElemType: types.StringType}},
380+
},
381+
expected: testtypes.ListType{ListType: types.ListType{ElemType: types.StringType}},
382+
},
383383
}
384384

385385
for name, testCase := range testCases {

ephemeral/schema/list_nested_block_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -453,12 +453,12 @@ func TestListNestedBlockType(t *testing.T) {
453453
},
454454
},
455455
},
456-
// "custom-type": {
457-
// block: schema.ListNestedBlock{
458-
// CustomType: testtypes.ListType{},
459-
// },
460-
// expected: testtypes.ListType{},
461-
// },
456+
"custom-type": {
457+
block: schema.ListNestedBlock{
458+
CustomType: testtypes.ListType{ListType: types.ListType{ElemType: types.StringType}},
459+
},
460+
expected: testtypes.ListType{ListType: types.ListType{ElemType: types.StringType}},
461+
},
462462
}
463463

464464
for name, testCase := range testCases {

0 commit comments

Comments
 (0)