Documentation ¶
Index ¶
- Variables
- func Run(ctx *Context) bool
- func TestConnectionError(ctx *Context, http2Conn *Http2Conn, codes []http2.ErrCode) (pass bool, expected []Result, actual Result)
- func TestErrorCode(code http2.ErrCode, expected []http2.ErrCode) bool
- func TestStreamClose(ctx *Context, http2Conn *Http2Conn) (pass bool, expected []Result, actual Result)
- func TestStreamError(ctx *Context, http2Conn *Http2Conn, codes []http2.ErrCode) (pass bool, expected []Result, actual Result)
- type Context
- type Http2Conn
- type Logger
- type Result
- type ResultConnectionClose
- type ResultError
- type ResultFrame
- type ResultSkipped
- type ResultStreamClose
- type ResultTestTimeout
- type RunMode
- type TcpConn
- type Test
- type TestCase
- func (tc *TestCase) HandleFunc(handler func(*Context) (bool, []Result, Result))
- func (tc *TestCase) PrintEphemeralDesc()
- func (tc *TestCase) PrintFail(expected []Result, actual Result)
- func (tc *TestCase) PrintPass()
- func (tc *TestCase) PrintSkipped(actual Result)
- func (tc *TestCase) Run(ctx *Context) TestResult
- type TestGroup
- func ConnectionErrorHandlingTestGroup(ctx *Context) *TestGroup
- func ConnectionSpecificHeaderFieldsTestGroup(ctx *Context) *TestGroup
- func ContinuationTestGroup(ctx *Context) *TestGroup
- func DataTestGroup(ctx *Context) *TestGroup
- func DefinedSettingsParametersTestGroup(ctx *Context) *TestGroup
- func ErrorHandlingTestGroup(ctx *Context) *TestGroup
- func ExtendingHttp2TestGroup(ctx *Context) *TestGroup
- func FrameSizeTestGroup(ctx *Context) *TestGroup
- func GoawayTestGroup(ctx *Context) *TestGroup
- func HeaderCompressionAndDecompressionTestGroup(ctx *Context) *TestGroup
- func HeadersTestGroup(ctx *Context) *TestGroup
- func Http2ConnectionPrefaceTestGroup(ctx *Context) *TestGroup
- func HttpHeaderFieldsTestGroup(ctx *Context) *TestGroup
- func HttpRequestResponseExchangeTestGroup(ctx *Context) *TestGroup
- func InitialFlowControlWindowSizeTestGroup(ctx *Context) *TestGroup
- func MalformedRequestsAndResponsesTestGroup(ctx *Context) *TestGroup
- func NewTestGroup(section, name string) *TestGroup
- func PingTestGroup(ctx *Context) *TestGroup
- func PriorityTestGroup(ctx *Context) *TestGroup
- func PseudoHeaderFieldsTestGroup(ctx *Context) *TestGroup
- func RequestPseudoHeaderFieldsTestGroup(ctx *Context) *TestGroup
- func RstStreamTestGroup(ctx *Context) *TestGroup
- func ServerPushTestGroup(ctx *Context) *TestGroup
- func SettingsTestGroup(ctx *Context) *TestGroup
- func StreamConcurrencyTestGroup(ctx *Context) *TestGroup
- func StreamDependenciesTestGroup(ctx *Context) *TestGroup
- func StreamIdentifiersTestGroup(ctx *Context) *TestGroup
- func StreamPriorityTestGroup(ctx *Context) *TestGroup
- func StreamStatesTestGroup(ctx *Context) *TestGroup
- func TheFlowControlWindowTestGroup(ctx *Context) *TestGroup
- func WindowUpdateTestGroup(ctx *Context) *TestGroup
- func (tg *TestGroup) AddTestCase(testCase *TestCase)
- func (tg *TestGroup) AddTestGroup(testGroup *TestGroup)
- func (tg *TestGroup) CountFailed() int
- func (tg *TestGroup) CountSkipped() int
- func (tg *TestGroup) CountTestCases() int
- func (tg *TestGroup) PrintFailedTestCase(ctx *Context)
- func (tg *TestGroup) PrintFooter()
- func (tg *TestGroup) PrintHeader()
- func (tg *TestGroup) Run(ctx *Context) bool
- type TestResult
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCodeDefault http2.ErrCode = math.MaxUint8
View Source
var FlagDefault http2.Flags = math.MaxUint8
View Source
var LengthDefault uint32 = math.MaxUint32
View Source
var TIMEOUT = errors.New("Timeout")
Functions ¶
func TestConnectionError ¶
func TestStreamClose ¶
Types ¶
type Context ¶
type Context struct { Port int Host string Strict bool Junit string Tls bool TlsConfig *tls.Config Sections map[string]bool Timeout time.Duration Verbose bool }
func (*Context) GetRunMode ¶
type Http2Conn ¶
type Http2Conn struct { HpackEncoder *hpack.Encoder HeaderWriteBuf bytes.Buffer Settings map[http2.SettingID]uint32 // contains filtered or unexported fields }
func CreateHttp2Conn ¶
func (*Http2Conn) EncodeHeader ¶
func (h2Conn *Http2Conn) EncodeHeader(header []hpack.HeaderField) []byte
EncodeHeader encodes header and returns encoded bytes. h2Conn retains encoding context and next call of EncodeHeader will be performed using the same encoding context.
type Logger ¶ added in v1.2.0
type Logger struct {
IndentLevel int
}
func (*Logger) ResetColor ¶ added in v1.2.0
func (Log *Logger) ResetColor()
func (*Logger) WriteBlank ¶ added in v1.2.0
func (log *Logger) WriteBlank()
type ResultConnectionClose ¶
type ResultConnectionClose struct{}
func (*ResultConnectionClose) String ¶
func (rcc *ResultConnectionClose) String() string
type ResultError ¶
type ResultError struct {
Error error
}
func (*ResultError) String ¶
func (re *ResultError) String() string
type ResultFrame ¶
type ResultFrame struct { Length uint32 Type http2.FrameType Flags http2.Flags ErrCode http2.ErrCode }
func CreateResultFrame ¶ added in v1.1.0
func CreateResultFrame(f http2.Frame) (rf *ResultFrame)
func (*ResultFrame) String ¶
func (rf *ResultFrame) String() string
type ResultSkipped ¶
type ResultSkipped struct {
Reason string
}
func (*ResultSkipped) String ¶
func (rs *ResultSkipped) String() string
type ResultStreamClose ¶
type ResultStreamClose struct{}
func (*ResultStreamClose) String ¶
func (rsc *ResultStreamClose) String() string
type ResultTestTimeout ¶
type ResultTestTimeout struct{}
func (*ResultTestTimeout) String ¶
func (ttr *ResultTestTimeout) String() string
type TcpConn ¶
type TcpConn struct {
// contains filtered or unexported fields
}
func CreateTcpConn ¶
type TestCase ¶
func NewTestCase ¶
func (*TestCase) HandleFunc ¶
func (*TestCase) PrintEphemeralDesc ¶
func (tc *TestCase) PrintEphemeralDesc()
func (*TestCase) PrintSkipped ¶
func (*TestCase) Run ¶
func (tc *TestCase) Run(ctx *Context) TestResult
type TestGroup ¶
func ContinuationTestGroup ¶
func DataTestGroup ¶
func ErrorHandlingTestGroup ¶
func ExtendingHttp2TestGroup ¶
func FrameSizeTestGroup ¶
func GoawayTestGroup ¶
func HeadersTestGroup ¶
func NewTestGroup ¶
func PingTestGroup ¶
func PriorityTestGroup ¶
func RstStreamTestGroup ¶
func ServerPushTestGroup ¶
func SettingsTestGroup ¶
func StreamDependenciesTestGroup ¶ added in v1.0.1
func StreamPriorityTestGroup ¶ added in v1.0.1
func StreamStatesTestGroup ¶
func WindowUpdateTestGroup ¶
func (*TestGroup) AddTestCase ¶
func (*TestGroup) AddTestGroup ¶
func (*TestGroup) CountFailed ¶
func (*TestGroup) CountSkipped ¶
func (*TestGroup) CountTestCases ¶
func (*TestGroup) PrintFailedTestCase ¶
PrintFailedTestCase prints failed TestCase results under this TestGroup.
func (*TestGroup) PrintFooter ¶
func (tg *TestGroup) PrintFooter()
func (*TestGroup) PrintHeader ¶
func (tg *TestGroup) PrintHeader()
type TestResult ¶
type TestResult int
const ( Failed TestResult = iota Skipped Passed )
TestResult indicates the result of test case
Source Files ¶
Click to show internal directories.
Click to hide internal directories.