Documentation ¶
Index ¶
- Constants
- func AgentInfoObj() *api.AgentInfo
- func AssertAgentToken(t *testing.T, r *http.Request, agentToken api.AgentToken)
- func AssertCommonRequestParams(t *testing.T, r *http.Request, correlationId string)
- func AssertGetJsonRequest(t *testing.T, r *http.Request)
- func AssertGetJsonRequestIsCorrect(t *testing.T, r *http.Request, correlationId string)
- func AssertGetRequestIsCorrect(t *testing.T, r *http.Request, correlationId string)
- func AssertInvalid(t *testing.T, tests []InvalidTestcase)
- func AssertJWTSignature(t *testing.T, r *http.Request)
- func AssertRequestAccept(t *testing.T, r *http.Request, accept string)
- func AssertRequestAcceptJson(t *testing.T, r *http.Request)
- func AssertRequestContentTypeJson(t *testing.T, r *http.Request)
- func AssertRequestMethod(t *testing.T, r *http.Request, method string)
- func AssertRequestUserAgent(t *testing.T, r *http.Request, userAgent string)
- func AssertValid(t *testing.T, tests []ValidTestcase)
- func CtxWithCorrelation(t *testing.T) (context.Context, string)
- func NewBackoff() retry.BackoffManagerFactory
- func RecvMsg(value interface{}) func(interface{})
- func RespondWithJSON(t *testing.T, w http.ResponseWriter, response interface{})
- func SetValue(target, value interface{})
- type InvalidTestcase
- type ValidTestcase
- type Validatable
Constants ¶
View Source
const ( KasUserAgent = "kas/v0.1-blabla/asdwd" KasCorrelationClientName = "gitlab-kas-test" AgentkToken api.AgentToken = "123123" AuthSecretKey = "blablabla" CorrelationIdHeader = "X-Request-ID" CorrelationClientNameHeader = "X-GitLab-Client-Name" AgentId int64 = 123 ProjectId int64 = 321 )
Variables ¶
This section is empty.
Functions ¶
func AgentInfoObj ¶
func AssertAgentToken ¶
func AssertInvalid ¶
func AssertInvalid(t *testing.T, tests []InvalidTestcase)
func AssertRequestUserAgent ¶
func AssertValid ¶
func AssertValid(t *testing.T, tests []ValidTestcase)
func NewBackoff ¶
func NewBackoff() retry.BackoffManagerFactory
func RespondWithJSON ¶
func RespondWithJSON(t *testing.T, w http.ResponseWriter, response interface{})
Types ¶
type InvalidTestcase ¶
type InvalidTestcase struct { Name string ErrString string Invalid Validatable }
type ValidTestcase ¶
type ValidTestcase struct { Name string Valid Validatable }
type Validatable ¶
type Validatable interface {
Validate() error
}
Click to show internal directories.
Click to hide internal directories.