From 8664d5413d3f1d142f38c492d89c1352a3f1730c Mon Sep 17 00:00:00 2001 From: aler9 <46489434+aler9@users.noreply.github.com> Date: Wed, 11 Jan 2023 00:47:39 +0100 Subject: [PATCH] fix high level tests --- internal/highleveltests/server_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/highleveltests/server_test.go b/internal/highleveltests/server_test.go index 9d133e17..41859d64 100644 --- a/internal/highleveltests/server_test.go +++ b/internal/highleveltests/server_test.go @@ -283,7 +283,7 @@ func TestServerRecordRead(t *testing.T) { } }, onDescribe: func(ctx *gortsplib.ServerHandlerOnDescribeCtx) (*base.Response, *gortsplib.ServerStream, error) { - if ctx.Path != "test/stream" { + if ctx.Path != "/test/stream" { return &base.Response{ StatusCode: base.StatusBadRequest, }, nil, fmt.Errorf("invalid path (%s)", ctx.Request.URL) @@ -308,7 +308,7 @@ func TestServerRecordRead(t *testing.T) { }, stream, nil }, onAnnounce: func(ctx *gortsplib.ServerHandlerOnAnnounceCtx) (*base.Response, error) { - if ctx.Path != "test/stream" { + if ctx.Path != "/test/stream" { return &base.Response{ StatusCode: base.StatusBadRequest, }, fmt.Errorf("invalid path (%s)", ctx.Request.URL) @@ -336,7 +336,7 @@ func TestServerRecordRead(t *testing.T) { }, nil }, onSetup: func(ctx *gortsplib.ServerHandlerOnSetupCtx) (*base.Response, *gortsplib.ServerStream, error) { - if ctx.Path != "test/stream" { + if ctx.Path != "/test/stream" { return &base.Response{ StatusCode: base.StatusBadRequest, }, nil, fmt.Errorf("invalid path (%s)", ctx.Request.URL) @@ -358,7 +358,7 @@ func TestServerRecordRead(t *testing.T) { }, stream, nil }, onPlay: func(ctx *gortsplib.ServerHandlerOnPlayCtx) (*base.Response, error) { - if ctx.Path != "test/stream" { + if ctx.Path != "/test/stream" { return &base.Response{ StatusCode: base.StatusBadRequest, }, fmt.Errorf("invalid path (%s)", ctx.Request.URL) @@ -374,7 +374,7 @@ func TestServerRecordRead(t *testing.T) { }, nil }, onRecord: func(ctx *gortsplib.ServerHandlerOnRecordCtx) (*base.Response, error) { - if ctx.Path != "test/stream" { + if ctx.Path != "/test/stream" { return &base.Response{ StatusCode: base.StatusBadRequest, }, fmt.Errorf("invalid path (%s)", ctx.Request.URL)