Documentation ¶
Index ¶
- func AssertBytes(tb testing.TB, expected []byte, actual []byte, msg string, v ...interface{})
- func AssertEqual(tb testing.TB, actual, expected, msg string, v ...interface{})
- func AssertStatus(tb testing.TB, actual int, expected int, v ...interface{})
- func ImportRole(k8s *fake.Clientset, path string) error
- func ImportRoleBinding(k8s *fake.Clientset, path string) error
- func MustReadFile(tb testing.TB, filename string, v ...interface{}) []byte
- func ServeFakeHTTP(router *mux.Router, method, url string, headers []string, body ...string) *httptest.ResponseRecorder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertBytes ¶
AssertBytes asserts that 2 []byte are equal
func AssertEqual ¶
AssertEqual asserts that 2 strings are equal
func AssertStatus ¶
AssertStatus asserts that the HTTP status code is as expected
func ImportRole ¶
ImportRole imports a role into a fake k8s instance
func ImportRoleBinding ¶
ImportRoleBinding imports rolebinding into a fake k8s instance
func MustReadFile ¶
MustReadFile fails the test if a file cannot be read
func ServeFakeHTTP ¶
func ServeFakeHTTP(router *mux.Router, method, url string, headers []string, body ...string) *httptest.ResponseRecorder
ServeFakeHTTP creates a fake request and records the response from a relevant route.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.