gofr icon indicating copy to clipboard operation
gofr copied to clipboard

Refactor service package tests

Open Umang01-hash opened this issue 2 months ago • 5 comments

The directory pkg/gofr/service has a lot of code duplication in tests and the code can also be cleaned and refactored.

Umang01-hash avatar Oct 16 '25 05:10 Umang01-hash

assign

aaryyya avatar Oct 16 '25 08:10 aaryyya

Sure @aaryyya assigning the same to you.

Umang01-hash avatar Oct 16 '25 10:10 Umang01-hash

Can i work on it too? there is much files for two

0xEbrahim avatar Oct 16 '25 14:10 0xEbrahim

I would like to assist on this issue, please assign me asap

nikunj-kohli avatar Oct 23 '25 07:10 nikunj-kohli

@Umang01-hash can u please provide any examples of duplication and also in what way would u like the code refactored or do u want the duplication removed as refactoring? ?

aaryyya avatar Oct 31 '25 17:10 aaryyya

@Umang01-hash can u please provide any examples of duplication and also in what way would u like the code refactored or do u want the duplication removed as refactoring? ?

Hi so the issue is I think There might be redundant code that can be reduced into common helper functions and can be used. I think he means that.

coolwednesday avatar Nov 17 '25 05:11 coolwednesday

@aaryyya most of the duplicated code was tests inside new_test.go, that was refactored in PR #2440. I think we can close the issue for now. If you find any code that is duplicated, or not reused properly in service package we can reopen the issue and work on the same.

Umang01-hash avatar Nov 17 '25 05:11 Umang01-hash