Documentation ¶
Index ¶
- func GetResponseBody(response *httptest.ResponseRecorder, target interface{}) error
- type Utils
- func (tu *Utils) ExecuteRequest(method, endpoint string) *httptest.ResponseRecorder
- func (tu *Utils) ExecuteRequestWithParameters(method, endpoint string, parameters interface{}) *httptest.ResponseRecorder
- func (tu *Utils) SetAllowedADGroups(adGroups []string)
- func (tu *Utils) SetAuthProvider(ap auth.AuthProvider)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetResponseBody ¶
func GetResponseBody(response *httptest.ResponseRecorder, target interface{}) error
GetResponseBody Gets response payload as type
Types ¶
type Utils ¶
type Utils struct {
// contains filtered or unexported fields
}
Utils Instance variables
func NewTestUtils ¶
func NewTestUtils(controllers ...models.Controller) Utils
NewTestUtils Constructor
func (*Utils) ExecuteRequest ¶
func (tu *Utils) ExecuteRequest(method, endpoint string) *httptest.ResponseRecorder
ExecuteRequest Helper method to issue a http request
func (*Utils) ExecuteRequestWithParameters ¶
func (tu *Utils) ExecuteRequestWithParameters(method, endpoint string, parameters interface{}) *httptest.ResponseRecorder
ExecuteRequestWithParameters Helper method to issue a http request with payload
func (*Utils) SetAllowedADGroups ¶
func (*Utils) SetAuthProvider ¶
func (tu *Utils) SetAuthProvider(ap auth.AuthProvider)
SetAuthProvider sets auth provider
Click to show internal directories.
Click to hide internal directories.