Skip to content

Commit

Permalink
remove resource drift from this test
Browse files Browse the repository at this point in the history
  • Loading branch information
austinvalle committed Mar 25, 2024
1 parent d8822b7 commit cad35de
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 8 deletions.
3 changes: 0 additions & 3 deletions internal/framework5provider/dynamic_edge_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ func (r DynamicEdgeResource) Read(ctx context.Context, req resource.ReadRequest,
return
}

// Refreshed to a string type
data.ComputedDynamicTypeChanges = types.DynamicValue(types.StringValue("it's a string!"))

resp.Diagnostics.Append(resp.State.Set(ctx, &data)...)
}

Expand Down
2 changes: 1 addition & 1 deletion internal/framework5provider/dynamic_edge_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func TestDynamicEdge_computed_type_changes(t *testing.T) {
// // After update, it's a number!
// statecheck.ExpectKnownValue("framework_dynamic_edge.test", tfjsonpath.New("computed_dynamic_type_changes"), knownvalue.Int64Exact(200)),
// },
ExpectError: regexp.MustCompile(`unexpected new value: .computed_dynamic_type_changes: wrong final value type:\nstring required.`),
ExpectError: regexp.MustCompile(`unexpected new value: .computed_dynamic_type_changes: wrong final value type:\nbool required.`),
},
},
})
Expand Down
3 changes: 0 additions & 3 deletions internal/framework6provider/dynamic_edge_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ func (r DynamicEdgeResource) Read(ctx context.Context, req resource.ReadRequest,
return
}

// Refreshed to a string type
data.ComputedDynamicTypeChanges = types.DynamicValue(types.StringValue("it's a string!"))

resp.Diagnostics.Append(resp.State.Set(ctx, &data)...)
}

Expand Down
2 changes: 1 addition & 1 deletion internal/framework6provider/dynamic_edge_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func TestDynamicEdge_computed_type_changes(t *testing.T) {
// // After update, it's a number!
// statecheck.ExpectKnownValue("framework_dynamic_edge.test", tfjsonpath.New("computed_dynamic_type_changes"), knownvalue.Int64Exact(200)),
// },
ExpectError: regexp.MustCompile(`unexpected new value: .computed_dynamic_type_changes: wrong final value type:\nstring required.`),
ExpectError: regexp.MustCompile(`unexpected new value: .computed_dynamic_type_changes: wrong final value type:\nbool required.`),
},
},
})
Expand Down

0 comments on commit cad35de

Please sign in to comment.