Skip to content

Commit

Permalink
chore: review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
Anush008 committed Sep 3, 2024
1 parent 24ae329 commit b0ca63e
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 8 deletions.
3 changes: 0 additions & 3 deletions qdrant/collections.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,12 @@ func (c *Client) DeleteCollection(ctx context.Context, collectionName string) er
res, err := c.GetCollectionsClient().Delete(ctx, &DeleteCollection{
CollectionName: collectionName,
})

if err != nil {
return newQdrantErr(err, "DeleteCollection", collectionName)
}

if !res.GetResult() {
return newQdrantErr(errors.New("failed to delete collection"), "DeleteCollection", collectionName)
}

return nil
}

Expand Down
2 changes: 1 addition & 1 deletion qdrant/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strings"
)

//nolint:revive // The linter says qdrant.QdrantErr stutters, but it's an apt name.
//nolint:revive // The linter says qdrant.QdrantError stutters, but it's an apt name.
type QdrantError struct {
operationName string
context string
Expand Down
2 changes: 1 addition & 1 deletion qdrant_test/collections_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func TestCollectionsClient(t *testing.T) {
apiKey := "<COLLECTIONS_TEST>"

ctx, cancel := context.WithCancel(context.Background())
t.Cleanup(cancel)
defer cancel()

container, err := distributedQdrant(ctx, apiKey)
require.NoError(t, err)
Expand Down
2 changes: 1 addition & 1 deletion qdrant_test/points_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func TestPointsClient(t *testing.T) {
apiKey := "<POINTS_TEST>"

ctx, cancel := context.WithCancel(context.Background())
t.Cleanup(cancel)
defer cancel()

container, err := standaloneQdrant(ctx, apiKey)
require.NoError(t, err)
Expand Down
2 changes: 1 addition & 1 deletion qdrant_test/qdrant_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func TestHealthCheck(t *testing.T) {
apiKey := "<HEALTHCHECK_TEST>"

ctx, cancel := context.WithCancel(context.Background())
t.Cleanup(cancel)
defer cancel()

container, err := standaloneQdrant(ctx, apiKey)
require.NoError(t, err)
Expand Down
2 changes: 1 addition & 1 deletion qdrant_test/snapshots_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func TestSnapshotsClient(t *testing.T) {
apiKey := "<SNAPSHOTS_TEST>"

ctx, cancel := context.WithCancel(context.Background())
t.Cleanup(cancel)
defer cancel()

container, err := standaloneQdrant(ctx, apiKey)
require.NoError(t, err)
Expand Down

0 comments on commit b0ca63e

Please sign in to comment.