Skip to content

Commit 35a5bff

Browse files
committed
(test) remove pointless test
1 parent a0be182 commit 35a5bff

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

internal/provider/helpers.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,5 @@ func ConfigureClient(req any, resp any) *client.Client {
4646

4747
// ImportStatePassthroughID is a helper that implements the common import state pattern
4848
func ImportStatePassthroughID(req resource.ImportStateRequest, resp *resource.ImportStateResponse) {
49-
resource.ImportStatePassthroughID(context.TODO(), path.Root("id"), req, resp)
49+
resp.Diagnostics.Append(resp.State.SetAttribute(context.Background(), path.Root("id"), req.ID)...)
5050
}

internal/provider/helpers_test.go

-12
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,3 @@ func TestConfigureClient(t *testing.T) {
8585
})
8686
}
8787
}
88-
89-
func TestImportStatePassthroughID(t *testing.T) {
90-
t.Parallel()
91-
92-
req := resource.ImportStateRequest{
93-
ID: "test-id",
94-
}
95-
resp := &resource.ImportStateResponse{}
96-
97-
provider.ImportStatePassthroughID(req, resp)
98-
assert.False(t, resp.Diagnostics.HasError())
99-
}

0 commit comments

Comments
 (0)