testutil

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2019 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package testutil contains utilities to run tests

Index

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

func CreateTestServerWithQueryString

func CreateTestServerWithQueryString(t *testing.T, expectedMethod string, expectedPath string, expectedQuery string) *httptest.Server

CreateTestServerWithQueryString creates a test server with expectedMethod, expectedPah and expected query string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL