You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lal/pkg/base/http_server_test.go

45 lines
906 B
Go

// Copyright 2021, Chef. All rights reserved.
// https://github.com/q191201771/lal
//
// Use of this source code is governed by a MIT-style license
// that can be found in the License file.
//
// Author: Chef (191201771@qq.com)
package base
import (
"testing"
)
func TestHttpServerManager(t *testing.T) {
//var err error
//
//var fnFlv = func(writer http.ResponseWriter, request *http.Request) {
// nazalog.Debugf("> fnFlv")
//}
//
//var fnTs = func(writer http.ResponseWriter, request *http.Request) {
// nazalog.Debugf("> fnTs")
//}
//
//sm := NewHttpServerManager()
//
//err = sm.AddListen(
// LocalAddrCtx{IsHttps: false, Addr: ":8080"},
// "/",
// fnFlv,
//)
//assert.Equal(t, nil, err)
//
//err = sm.AddListen(
// LocalAddrCtx{IsHttps: false, Addr: ":8080"},
// "/live/",
// fnTs,
//)
//assert.Equal(t, nil, err)
//
//err = sm.RunLoop()
//assert.Equal(t, nil, err)
}