Documentation ¶
Overview ¶
Package testutil contains utilities to run tests
Index ¶
- Variables
- func CreateSimpleTestServer(t *testing.T, expectedMethod string, expectedPath string) *httptest.Server
- func CreateTestServer(t *testing.T, expectedMethod string, expectedPath string, expectedQuery string, ...) *httptest.Server
- func CreateTestServerWithBody(t *testing.T, expectedMethod string, expectedPath string, ...) *httptest.Server
- func CreateTestServerWithPreviousGetResponse(t *testing.T, firstResponse interface{}, expectedMethod string, ...) *httptest.Server
- func CreateTestServerWithQueryString(t *testing.T, expectedMethod string, expectedPath string, expectedQuery string) *httptest.Server
Constants ¶
This section is empty.
Variables ¶
View Source
var TestAPIKey = "12345"
TestAPIKey is the api key of the GoDaddy server during the tests
View Source
var TestAPISecret = "54321"
TestAPISecret is the api secret of the GoDaddy server during the tests
Functions ¶
func CreateSimpleTestServer ¶
func CreateSimpleTestServer(t *testing.T, expectedMethod string, expectedPath string) *httptest.Server
CreateSimpleTestServer creates a test server with expectedMethod and expectedPah
func CreateTestServer ¶
func CreateTestServer(t *testing.T, expectedMethod string, expectedPath string, expectedQuery string, expectedBody interface{}) *httptest.Server
CreateTestServer creates a test server with indicated expectations
func CreateTestServerWithBody ¶
func CreateTestServerWithBody(t *testing.T, expectedMethod string, expectedPath string, expectedBody interface{}) *httptest.Server
CreateTestServerWithBody creates a test server with expectedMethod, expectedPah and expected body
func CreateTestServerWithPreviousGetResponse ¶
func CreateTestServerWithPreviousGetResponse(t *testing.T, firstResponse interface{}, expectedMethod string, expectedPath string, expectedBody interface{}) *httptest.Server
CreateTestServerWithPreviousGetResponse creates a test server ready for two response
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.