An incorrect result is recorded during the execution of a test scenario that involves detecting the ViolatedForeignKey error:
`message: "Duplicate unique value error in table members: Key (user_id)=(0) already exists.'. However, this result is inappropriate for the situation, since there is no user with the specified identifier (user_id=0). In the normal mode, the error is worked out
Reproducing the bug
go test integration_test.go
Relevant log output
--- FAIL: TestCreateMembers (0.01s)
--- FAIL: TestCreateMembers/ViolatedForeignKeyError (0.00s)
integration_test.go:213:
Error Trace: /integration-test/integration_test.go:213
Error: Not equal:
expected: 404
actual : 400
Test: TestCreateMembers/ViolatedForeignKeyError
integration_test.go:214:
Error Trace: /integration-test/integration_test.go:214
Error: Not equal:
expected: "{\"code\":404,\"message\":\"Foreign key violation value error in table : \"}"
actual : "{\"code\":400,\"message\":\"Duplicate unique value error in table members: Key (user_id)=(0) already exists.\"}"
Diff:
--- Expected
+++ Actual
@@ -1 +1 @@
-{"code":404,"message":"Foreign key violation value error in table : "}
+{"code":400,"message":"Duplicate unique value error in table members: Key (user_id)=(0) already exists."}
Test: TestCreateMembers/ViolatedForeignKeyError
FAIL
FAIL command-line-arguments 2.782s
FAIL
On which operating system are you observing this issue?
Linux
In which environment are you deploying?
Other
Additional Context
Before the test, two users with user_id 1000 and 1001 were initialized using test assemblies. Therefore, it is unclear why an error would occur with an identifier that is not in this range.
Preflight checklist
Ory Network Project
No response
Describe the bug
An incorrect result is recorded during the execution of a test scenario that involves detecting the ViolatedForeignKey error: `message: "Duplicate unique value error in table members: Key (user_id)=(0) already exists.'. However, this result is inappropriate for the situation, since there is no user with the specified identifier (user_id=0). In the normal mode, the error is worked out
Reproducing the bug
Relevant log output
Relevant configuration
Version
v3.3.5+incompatible
On which operating system are you observing this issue?
Linux
In which environment are you deploying?
Other
Additional Context
Before the test, two users with user_id 1000 and 1001 were initialized using test assemblies. Therefore, it is unclear why an error would occur with an identifier that is not in this range.