Skip to content

Commit

Permalink
Removes redundant testing type
Browse files Browse the repository at this point in the history
  • Loading branch information
gdavison committed Aug 8, 2024
1 parent fd39cae commit 86b9e6d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
18 changes: 9 additions & 9 deletions internal/framework/flex/auto_flatten_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,14 @@ func TestFlatten(t *testing.T) {
},
},
},
Target: &tfSingleStringField2{},
WantTarget: &tfSingleStringField2{
Target: &tfSingleStringField{},
WantTarget: &tfSingleStringField{
Field1: types.StringValue(`{"test":"a"}`),
},
expectedLogLines: []map[string]any{
infoFlattening(reflect.TypeFor[*awsJSONStringer](), reflect.TypeFor[*tfSingleStringField2]()),
infoConverting(reflect.TypeFor[awsJSONStringer](), reflect.TypeFor[*tfSingleStringField2]()),
traceMatchedFields("Field1", reflect.TypeFor[awsJSONStringer](), "Field1", reflect.TypeFor[*tfSingleStringField2]()),
infoFlattening(reflect.TypeFor[*awsJSONStringer](), reflect.TypeFor[*tfSingleStringField]()),
infoConverting(reflect.TypeFor[awsJSONStringer](), reflect.TypeFor[*tfSingleStringField]()),
traceMatchedFields("Field1", reflect.TypeFor[awsJSONStringer](), "Field1", reflect.TypeFor[*tfSingleStringField]()),
infoConvertingWithPath("Field1", reflect.TypeFor[smithyjson.JSONStringer](), "Field1", reflect.TypeFor[types.String]()),
},
},
Expand Down Expand Up @@ -166,14 +166,14 @@ func TestFlatten(t *testing.T) {
Source: &awsJSONStringer{
Field1: &testJSONDocumentError{},
},
Target: &tfSingleStringField2{},
Target: &tfSingleStringField{},
expectedDiags: diag.Diagnostics{
diagFlatteningMarshalSmithyDocument(reflect.TypeFor[*testJSONDocumentError](), errMarshallSmithyDocument),
},
expectedLogLines: []map[string]any{
infoFlattening(reflect.TypeFor[*awsJSONStringer](), reflect.TypeFor[*tfSingleStringField2]()),
infoConverting(reflect.TypeFor[awsJSONStringer](), reflect.TypeFor[*tfSingleStringField2]()),
traceMatchedFields("Field1", reflect.TypeFor[awsJSONStringer](), "Field1", reflect.TypeFor[*tfSingleStringField2]()),
infoFlattening(reflect.TypeFor[*awsJSONStringer](), reflect.TypeFor[*tfSingleStringField]()),
infoConverting(reflect.TypeFor[awsJSONStringer](), reflect.TypeFor[*tfSingleStringField]()),
traceMatchedFields("Field1", reflect.TypeFor[awsJSONStringer](), "Field1", reflect.TypeFor[*tfSingleStringField]()),
infoConvertingWithPath("Field1", reflect.TypeFor[smithyjson.JSONStringer](), "Field1", reflect.TypeFor[types.String]()),
errorMarshallingJSONDocument("Field1", reflect.TypeFor[smithyjson.JSONStringer](), "Field1", reflect.TypeFor[types.String](), errMarshallSmithyDocument),
},
Expand Down
4 changes: 0 additions & 4 deletions internal/framework/flex/autoflex_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,6 @@ type awsJSONStringer struct {
Field1 smithyjson.JSONStringer `json:"field1"`
}

type tfSingleStringField2 struct {
Field1 types.String `tfsdk:"field1"`
}

type tfJSONStringer struct {
Field1 fwtypes.SmithyJSON[smithyjson.JSONStringer] `tfsdk:"field1"`
}
Expand Down

0 comments on commit 86b9e6d

Please sign in to comment.