Documentation ¶
Index ¶
- func Assert(t *testing.T, result bool, message string)
- func AssertBetween(t *testing.T, a, b, c int64)
- func AssertBigIntEquals(t *testing.T, one *big.Int, two *big.Int)
- func AssertByteEquals(t *testing.T, one []byte, two []byte)
- func AssertContains(t *testing.T, haystack string, needle string)
- func AssertDeepEquals(t *testing.T, one interface{}, two interface{})
- func AssertEquals(t *testing.T, one interface{}, two interface{})
- func AssertError(t *testing.T, err error, message string)
- func AssertIntEquals(t *testing.T, one int, two int)
- func AssertMarshaledEquals(t *testing.T, one interface{}, two interface{})
- func AssertNotContains(t *testing.T, haystack string, needle string)
- func AssertNotEquals(t *testing.T, one interface{}, two interface{})
- func AssertNotError(t *testing.T, err error, message string)
- func AssertNotNil(t *testing.T, obj interface{}, message string)
- func AssertSeverity(t *testing.T, data string, severity int)
- func ResetSATestDatabase(t testing.TB) func()
- type CleanUpDB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertBetween ¶
AssertBetween determines if a is between b and c
func AssertBigIntEquals ¶
AssertBigIntEquals uses the big.Int.cmp() method to measure whether one and two are equal
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 ResetSATestDatabase ¶
ResetSATestDatabase deletes all rows in all tables in the SA DB. If fails the tests if that errors and returns a clean up function that will delete all rows again and close the database. "Tables available" means all tables that can be seen in the MariaDB configuration by the database user except for ones that are configuration only like goose_db_version (for migrations) or the ones describing the internal configuration of the server. To be used only in test code.
Types ¶
type CleanUpDB ¶
type CleanUpDB interface { Begin() (*sql.Tx, error) Exec(query string, args ...interface{}) (sql.Result, error) Query(query string, args ...interface{}) (*sql.Rows, error) io.Closer }
CleanUpDB is an interface with only what is needed to delete all rows in all tables in a database plus close the database connection. It is satisfied by *sql.DB.
Directories ¶
Path | Synopsis |
---|---|
This is a test server that implements the subset of RFC6962 APIs needed to run Boulder's CT log submission code.
|
This is a test server that implements the subset of RFC6962 APIs needed to run Boulder's CT log submission code. |
proto
Package safebrowsing_proto is a generated protocol buffer package.
|
Package safebrowsing_proto is a generated protocol buffer package. |
ocsp
|
|