server: test invalid methods and double sessions

This commit is contained in:
aler9
2021-05-04 12:11:34 +02:00
committed by Alessandro Ros
parent 1a2dacadd8
commit b4dba4bfdd
3 changed files with 146 additions and 15 deletions

View File

@@ -31,6 +31,14 @@ func (e ErrServerCSeqMissing) Error() string {
return "CSeq is missing"
}
// ErrServerInvalidMethod is an error that can be returned by a server.
type ErrServerInvalidMethod struct{}
// Error implements the error interface.
func (e ErrServerInvalidMethod) Error() string {
return "invalid method"
}
// ErrServerWrongState is an error that can be returned by a server.
type ErrServerWrongState struct {
AllowedList []fmt.Stringer