Closed waveyboym closed 4 months ago
Describe the bug 4 tests are failing on the backend. Names are:
To Reproduce Steps to reproduce the behavior:
cd occupi-backend
occupi.bat test
Expected behavior All tests should pass
Screenshots
Logs
FAIL tests === Failed === FAIL: tests TestCancelBooking/Valid_Request (10.04s) [GIN] 2024/07/05 - 20:01:08 | 500 | 10.0357823s | | POST "/api/book-room" testing.go:1490: test executed panic(nil) or runtime.Goexit: subtest may have called FailNow on a parent test --- FAIL: TestCancelBooking/Valid_Request (10.04s) === FAIL: tests TestCancelBooking (10.13s) [GIN] 2024/07/05 - 20:00:58 | 200 | 0s | | GET "/ping-auth" handlers_test.go:351: could not create mock booking: expected status 200 but got 500 === FAIL: tests TestBookRoom/Valid_Request (42.87s) [GIN] 2024/07/05 - 20:01:51 | 500 | 42.8677488s | | POST "/api/book-room" handlers_test.go:536: Error Trace: C:/School Work/Year 3 Semester 1/COS 301 Notes/Capstone/occupi/occupi-backend/tests/handlers_test.go:536 Error: Not equal: expected: 200 actual : 500 Test: TestBookRoom/Valid_Request Messages: handler returned wrong status code handlers_test.go:545: Error Trace: C:/School Work/Year 3 Semester 1/COS 301 Notes/Capstone/occupi/occupi-backend/tests/handlers_test.go:545 Error: Not equal: expected: "Successfully booked!" actual : "Failed to send booking email" Diff: --- Expected +++ Actual @@ -1 +1 @@ -Successfully booked! +Failed to send booking email Test: TestBookRoom/Valid_Request Messages: handler returned unexpected message handlers_test.go:549: Error Trace: C:/School Work/Year 3 Semester 1/COS 301 Notes/Capstone/occupi/occupi-backend/tests/handlers_test.go:549 Error: Should NOT be empty, but was <nil> --- Expected +++ Actual @@ -1 +1 @@ -Successfully booked! +Failed to send booking email Test: TestBookRoom/Valid_Request Messages: handler returned unexpected message handlers_test.go:549: Error Trace: C:/School Work/Year 3 Semester 1/COS 301 Notes/Capstone/occupi/occupi-backend/tests/handlers_test.go:549 Error: Should NOT be empty, but was <nil> @@ -1 +1 @@ -Successfully booked! +Failed to send booking email Test: TestBookRoom/Valid_Request Messages: handler returned unexpected message handlers_test.go:549: Error Trace: C:/School Work/Year 3 Semester 1/COS 301 Notes/Capstone/occupi/occupi-backend/tests/handlers_test.go:549 Error: Should NOT be empty, but was <nil> Test: TestBookRoom/Valid_Request Messages: handler returned unexpected message handlers_test.go:549: Error Trace: C:/School Work/Year 3 Semester 1/COS 301 Notes/Capstone/occupi/occupi-backend/tests/handlers_test.go:549 Error: Should NOT be empty, but was <nil> Error Trace: C:/School Work/Year 3 Semester 1/COS 301 Notes/Capstone/occupi/occupi-backend/tests/handlers_test.go:549 Error: Should NOT be empty, but was <nil> Test: TestBookRoom/Valid_Request Messages: booking ID should not be empty Messages: booking ID should not be empty --- FAIL: TestBookRoom/Valid_Request (42.87s) --- FAIL: TestBookRoom/Valid_Request (42.87s) === FAIL: tests TestBookRoom (43.00s) [GIN] 2024/07/05 - 20:01:08 | 200 | 0s | | GET "/ping-auth" DONE 166 tests, 4 failures in 145.452s
Desktop (please complete the following information):
Additional context N/A
Yeah we can because of the new addition of cache
Describe the bug 4 tests are failing on the backend. Names are:
To Reproduce Steps to reproduce the behavior:
cd occupi-backend
occupi.bat test
Expected behavior All tests should pass
Screenshots
Logs
Desktop (please complete the following information):
Additional context N/A