Skip to content

Commit

Permalink
Fix mocked tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alexott committed Feb 1, 2024
1 parent 4068e5b commit 042785b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions vectorsearch/resource_vector_search_endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"testing"

"github.com/databricks/databricks-sdk-go/experimental/mocks"
"github.com/databricks/databricks-sdk-go/qa/poll"
"github.com/databricks/terraform-provider-databricks/qa"

"github.com/databricks/databricks-sdk-go/service/vectorsearch"
Expand All @@ -25,10 +26,11 @@ func TestVectorSearchEndpointCreate(t *testing.T) {
d, err := qa.ResourceFixture{
MockWorkspaceClientFunc: func(w *mocks.MockWorkspaceClient) {
e := w.GetMockVectorSearchEndpointsAPI().EXPECT()
e.CreateEndpointAndWait(mock.Anything, vectorsearch.CreateEndpoint{
e.CreateEndpoint(mock.Anything, vectorsearch.CreateEndpoint{
Name: "abc",
EndpointType: "STANDARD",
}, mock.Anything).Return(ei, nil)
}).Return(&vectorsearch.WaitGetEndpointVectorSearchEndpointOnline[vectorsearch.EndpointInfo]{Poll: poll.Simple(*ei)}, nil)

e.GetEndpointByEndpointName(mock.Anything, "abc").Return(ei, nil)
},
Resource: ResourceVectorSearchEndpoint(),

Check failure on line 36 in vectorsearch/resource_vector_search_endpoint_test.go

View workflow job for this annotation

GitHub Actions / tests

cannot use ResourceVectorSearchEndpoint() (value of type *schema.Resource) as "github.com/databricks/terraform-provider-databricks/common".Resource value in struct literal
Expand Down

0 comments on commit 042785b

Please sign in to comment.