Documentation
¶
Overview ¶
Package test_utils contains types and functions used to simplify creation and execution of unit and functional tests
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecuteFunctionalTests ¶
func ExecuteFunctionalTests(t *testing.T, tests []*FunctionalTest, serviceID string)
Types ¶
type FunctionalTest ¶
type FunctionalTest struct {
// CheckErrorFn is a function which can be used to perform
// additional validation of the error returned by TestFn; the
// function will be passed a formatted string containing the
// test case's name, along with the returned error
CheckErrorFn func(*testing.T, string, error)
// Name is the name of the test case, used in error messages
Name string
// Operation is the operation being performed, which will be
// used to construct the recorded fixture file's name
Operation string
// TestFn is the function to be called to run the test
TestFn func(*testing.T, *FunctionalTest, *fastly.Client, string) error
// WantNoError indicates that the test case should fail if any
// error is returned by TestFn
WantNoError bool
// WantError indicates the error (value, not type) that must
// be returned by TestFn for this test case
WantError error
}
Click to show internal directories.
Click to hide internal directories.