Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupTestServerClient ¶
func SetupTestServerClient(testingObj *testing.T, handlers *[]Handler) (*ibmc.ClientSession, *httptest.Server, error)
SetupTestServerClient sets up a unit test http server, and creates a client to be used in unit testing.
Params
testingObj - the test object handlers - the handlers that create the responses
Returns
- a configured "provider" client (ready to talk to the IBM cloud). nil of there is a problem
- the (started) test http server, on which the caller should call 'defer ....Close()' (reason for this is we need to keep it around to prevent garbage collection)
- an error (if there is one)
Types ¶
Click to show internal directories.
Click to hide internal directories.