Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
strideynet committed Dec 30, 2024
1 parent c28eac6 commit 8db9865
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/copy_from_terraform_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,11 @@ func TestCopyFromStringOverride(t *testing.T) {
obj := copyFromTerraformObject(t)

target := Test{}
require.False(t, CopyTestFromTerraform(context.Background(), obj, &target).HasError())
diags := CopyTestFromTerraform(context.Background(), obj, &target)
for _, err := range diags.Errors() {
t.Logf("%s DETAIL: %s SUMMARY: %s", err.Severity(), err.Detail(), err.Summary())
}
require.Empty(t, diags.Errors())

require.Equal(t, "a/b/c", target.StringOverride)
}
2 changes: 2 additions & 0 deletions test/fixtures.go
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,8 @@ func copyFromTerraformObject(t *testing.T) types.Object {
types.String{Value: "b"},
types.String{Value: "c"},
}},
"foo": types.String{Null: true},
"bar": types.String{Value: "ham"},
},
AttrTypes: obj.AttrTypes,
}
Expand Down

0 comments on commit 8db9865

Please sign in to comment.