From c575dc32898eaa5a970279e19883a23524dad626 Mon Sep 17 00:00:00 2001 From: Shashank Shekhar Date: Tue, 20 Feb 2024 12:08:34 +0530 Subject: [PATCH] INFRA-2911 | fixed test failure (#375) --- db/migration/000014_product_table.up.sql | 1 - service/products/product_service_test.go | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/db/migration/000014_product_table.up.sql b/db/migration/000014_product_table.up.sql index 3644254..8038602 100644 --- a/db/migration/000014_product_table.up.sql +++ b/db/migration/000014_product_table.up.sql @@ -10,5 +10,4 @@ CREATE TABLE product -- Indices ------------------------------------------------------- -CREATE UNIQUE INDEX product_name_key ON product (name text_ops); CREATE INDEX idx_product_name ON product (name text_ops); \ No newline at end of file diff --git a/service/products/product_service_test.go b/service/products/product_service_test.go index 7a11d87..086cdea 100644 --- a/service/products/product_service_test.go +++ b/service/products/product_service_test.go @@ -61,7 +61,7 @@ func (suite *ProductServiceSuite) TestProductServiceImpl_UpdateProductWithInvali } func (suite *ProductServiceSuite) TestProductServiceImpl_GetAllProducts() { - suite.repoMock.GetAllProductsMock.Return(&[]repo.ProductEntity{}, nil) + suite.repoMock.GetAllProductsMock.Return([]repo.ProductEntity{}, nil) _, err := suite.service.GetAllProducts() if err != nil {