socialpredict icon indicating copy to clipboard operation
socialpredict copied to clipboard

Add Error Case for /api/v0/setup within backend/handlers/setup/setuphandler_test.go

Open pwdel opened this issue 6 months ago • 0 comments

  • Within setuphandler_test.go we have a, "happy," test case which returns a 200.
  • We would like to create a test case that returns 500, in the case that the API does not work for whatever reason, for the sake of completion of the test.
  • This test case could be the same as the happy case, but use the http library to return an invalid HTTP response.
  • I had previously had trouble building this, the intended 500 error kept returning 200 and I'm not sure what I was doing wrong, so I just skipped it and went with only the happy case. If anyone knows how to fix this please do.

pwdel avatar Aug 25 '24 12:08 pwdel