You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since we are using Go's httptest to simulate our IntelOwl server through by creating a mock test server from httptest.Server and using httptest.ServeMux as a router to implement our mock responses on the specified endpoint
Right now we need are initializing the test server with every test. By using gorilla/mux we can implement a request method-based router from which we only need to set up the test server once and keep using that for every test!
To implement a common setup and teardown we can use TestMain. For more information, you can read about it here.
The text was updated successfully, but these errors were encountered:
Since we are using Go's
httptest
to simulate ourIntelOwl
server through by creating a mock test server fromhttptest.Server
and usinghttptest.ServeMux
as a router to implement our mock responses on the specified endpointRight now we need are initializing the test server with every test. By using gorilla/mux we can implement a request method-based router from which we only need to set up the test server once and keep using that for every test!
To implement a common setup and teardown we can use
TestMain
. For more information, you can read about it here.The text was updated successfully, but these errors were encountered: