boulder: github.com/letsencrypt/boulder/test Index | Files | Directories

package test

import "github.com/letsencrypt/boulder/test"

Index

Package Files

db.go test-tools.go

func Assert Uses

func Assert(t *testing.T, result bool, message string)

Assert a boolean

func AssertBetween Uses

func AssertBetween(t *testing.T, a, b, c int64)

AssertBetween determines if a is between b and c

func AssertBigIntEquals Uses

func AssertBigIntEquals(t *testing.T, one *big.Int, two *big.Int)

AssertBigIntEquals uses the big.Int.cmp() method to measure whether one and two are equal

func AssertByteEquals Uses

func AssertByteEquals(t *testing.T, one []byte, two []byte)

AssertByteEquals uses bytes.Equal to measure one and two for equality.

func AssertContains Uses

func AssertContains(t *testing.T, haystack string, needle string)

AssertContains determines whether needle can be found in haystack

func AssertDeepEquals Uses

func AssertDeepEquals(t *testing.T, one interface{}, two interface{})

AssertDeepEquals uses the reflect.DeepEqual method to measure one and two

func AssertEquals Uses

func AssertEquals(t *testing.T, one interface{}, two interface{})

AssertEquals uses the equality operator (==) to measure one and two

func AssertError Uses

func AssertError(t *testing.T, err error, message string)

AssertError checks that err is non-nil

func AssertIntEquals Uses

func AssertIntEquals(t *testing.T, one int, two int)

AssertIntEquals uses the equality operator to measure one and two.

func AssertMarshaledEquals Uses

func AssertMarshaledEquals(t *testing.T, one interface{}, two interface{})

AssertMarshaledEquals marshals one and two to JSON, and then uses the equality operator to measure them

func AssertNotContains Uses

func AssertNotContains(t *testing.T, haystack string, needle string)

AssertNotContains determines if needle is not found in haystack

func AssertNotEquals Uses

func AssertNotEquals(t *testing.T, one interface{}, two interface{})

AssertNotEquals uses the equality operator to measure that one and two are different

func AssertNotError Uses

func AssertNotError(t *testing.T, err error, message string)

AssertNotError checks that err is nil

func AssertNotNil Uses

func AssertNotNil(t *testing.T, obj interface{}, message string)

AssertNotNil checks an object to be non-nil

func AssertSeverity Uses

func AssertSeverity(t *testing.T, data string, severity int)

AssertSeverity determines if a string matches the Severity formatting

func ResetSATestDatabase Uses

func ResetSATestDatabase(t testing.TB) func()

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.

type CleanUpDB Uses

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

PathSynopsis
ct-test-srvThis is a test server that implements the subset of RFC6962 APIs needed to run Boulder's CT log submission code.
dns-test-srv
gsb-test-srv
gsb-test-srv/protoPackage safebrowsing_proto is a generated protocol buffer package.
load-generator
mail-test-srv
vars

Package test imports 11 packages (graph). Updated 2017-03-30. Refresh now. Tools for package owners.