octoposprime / op-be-user

OctopOS Prime Backend User
http://www.octoposprime.com
MIT License
17 stars 2 forks source link

The error I encountered while creating the test file. #7

Closed Smnrgcl closed 6 months ago

Smnrgcl commented 9 months ago

I created the test file, but I couldn't run it because I couldn't execute the main files of the project.

The error I encountered while running the test file.

PS C:\Users\semanur\OneDrive\Desktop\Project\github.com\octoposprime\op-be-user\internal\domain\service> go test --- FAIL: TestService_ValidateUser (0.00s) service_test.go:22: ValidateUser failed: error.user.empty --- FAIL: TestService_ValidatePassword (0.00s) service_test.go:38: ValidatePassword failed: error.user.empty --- FAIL: TestService_ValidateToken (0.00s) service_test.go:54: ValidateToken failed: error.user.token.empty --- FAIL: TestService_CheckUserNameRules (0.00s) service_test.go:70: CheckUserNameRules failed: error.user.username.empty --- FAIL: TestService_CheckEmailRules (0.00s) service_test.go:86: CheckEmailRules failed: error.user.email.empty --- FAIL: TestService_CheckPasswordRules (0.00s) service_test.go:102: CheckPasswordRules failed: error.user.password.empty FAIL exit status 1 FAIL github.com/octoposprime/op-be-user/internal/domain/service 26.128s PS C:\Users\semanur\OneDrive\Desktop\Project\github.com\octoposprime\op-be-user\internal\domain\service>

husamettinarabaci commented 8 months ago

Can you share test function code ?

Sddilora commented 7 months ago

Has the issue been resolved? If so, what was the solution to the problem?

Smnrgcl commented 6 months ago

Fix missing details in test file to eliminate errors

Completed the missing parts in the test file, resolving the previously encountered error. Now, running 'go test' successfully passes without issues:

C:\...\octoposprime\op-be-user\internal\domain\service> go test
PASS
ok      github.com/octoposprime/op-be-user/internal/domain/service      0.228s