Documentation ¶
Overview ¶
Copyright 2014 ISRG. All rights reserved This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
Copied from https://github.com/letsencrypt/boulder/blob/master/test/test-tools.go
See Q5 and Q11 here: https://www.mozilla.org/en-US/MPL/2.0/FAQ/ I think if we want to modify this file we have to release it publicly, otherwise we're fine.
Index ¶
- func Assert(t testing.TB, result bool, message string)
- func AssertBetween(t testing.TB, a, b, c int64)
- func AssertByteEquals(t testing.TB, one []byte, two []byte)
- func AssertContains(t testing.TB, haystack string, needle string)
- func AssertDeepEquals(t testing.TB, one interface{}, two interface{})
- func AssertEquals(t testing.TB, one interface{}, two interface{})
- func AssertError(t testing.TB, err error, message string)
- func AssertIntEquals(t testing.TB, one int, two int)
- func AssertMarshaledEquals(t testing.TB, one interface{}, two interface{})
- func AssertNotContains(t testing.TB, haystack string, needle string)
- func AssertNotEquals(t testing.TB, one interface{}, two interface{})
- func AssertNotError(t testing.TB, err error, message string)
- func AssertNotNil(t testing.TB, obj interface{}, message string)
- func AssertSeverity(t testing.TB, data string, severity int)
- func SetUp(t testing.TB)
- func TearDown(t testing.TB)
- func TruncateTables(t testing.TB) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertBetween ¶
AssertBetween determines if a is between b and c
func AssertByteEquals ¶
AssertByteEquals uses bytes.Equal to measure one and two for equality.
func AssertContains ¶
AssertContains determines whether needle can be found in haystack
func AssertDeepEquals ¶
AssertDeepEquals uses the reflect.DeepEqual method to measure one and two
func AssertEquals ¶
AssertEquals uses the equality operator (==) to measure one and two
func AssertError ¶
AssertError checks that err is non-nil
func AssertIntEquals ¶
AssertIntEquals uses the equality operator to measure one and two.
func AssertMarshaledEquals ¶
AssertMarshaledEquals marshals one and two to JSON, and then uses the equality operator to measure them
func AssertNotContains ¶
AssertNotContains determines if needle is not found in haystack
func AssertNotEquals ¶
AssertNotEquals uses the equality operator to measure that one and two are different
func AssertNotError ¶
AssertNotError checks that err is nil
func AssertNotNil ¶
AssertNotNil checks an object to be non-nil
func AssertSeverity ¶
AssertSeverity determines if a string matches the Severity formatting
func TearDown ¶
TearDown deletes all records from the database, and marks the test as failed if this was unsuccessful.
func TruncateTables ¶
TruncateTables deletes all records from the database.
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Integration tests for the archived_jobs table.
|
Integration tests for the archived_jobs table. |
cmd
|
|
Tests for the jobs dequeuer.
|
Tests for the jobs dequeuer. |
Package factory contains helpers for instantiating tests.
|
Package factory contains helpers for instantiating tests. |
Integration tests for the queued_jobs table.
|
Integration tests for the queued_jobs table. |
Tests for the jobs HTTP server.
|
Tests for the jobs HTTP server. |