Documentation ¶
Index ¶
- func CreateTestClient(t *testing.T) *interstellar.Client
- func DebugLog(t *testing.T, format string, v ...interface{})
- func FormatJSON(data []byte) []byte
- func NewTestLoggingRequester(t *testing.T, r interstellar.Requester) interstellar.Requester
- func ReadFileBytes(t *testing.T, file string) []byte
- func ToJSON(v interface{}) string
- type TestKey
- type TestLoggingRequester
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTestClient ¶
CreateTestClient creates an *interstellar.Client for tests It gets the cosmos db connection string from the environment variable `AZURE_COSMOS_DB_CONNECTION_STRING` If the environment variable is not set, it will cause the test to be skipped. If the environment variable fails to parse, the test will fail.
func FormatJSON ¶
FormatJSON formats the input json with indentation
func NewTestLoggingRequester ¶
NewTestLoggingRequester creates a new TestLoggingRequester which will log if the environment variable "DEBUG_LOGGING=Y" is
func ReadFileBytes ¶
ReadFileBytes reads the entire file, or calls t.Fatal if the file cannot be read
Types ¶
type TestKey ¶
type TestKey string
TestKey is a test authorizer which just sets the authorization header to whatever its value is
type TestLoggingRequester ¶
TestLoggingRequester is a requester which logs each http request/response to the test runner logger