Begin HTTPAgent integration tests

This commit is contained in:
DanB
2018-07-05 19:27:50 +02:00
parent ffbfcbba83
commit efc810e70d
13 changed files with 283 additions and 30 deletions

View File

@@ -654,6 +654,7 @@ const (
MetaAuth = "*auth"
APIKey = "APIKey"
APIMethods = "APIMethods"
NestingSep = "."
)
// MetaFilterIndexesAPIs

View File

@@ -185,7 +185,7 @@ func handleRequest(w http.ResponseWriter, r *http.Request) {
}
func (s *Server) ServeHTTP(addr string, jsonRPCURL string, wsRPCURL string,
useBasicAuth bool, userList map[string]string) {
useBasicAuth bool, userList map[string]string, exitChan chan bool) {
s.RLock()
enabled := s.rpcEnabled
s.RUnlock()
@@ -228,6 +228,7 @@ func (s *Server) ServeHTTP(addr string, jsonRPCURL string, wsRPCURL string,
}
Logger.Info(fmt.Sprintf("<HTTP> start listening at <%s>", addr))
http.ListenAndServe(addr, nil)
exitChan <- true
}
func (s *Server) ServeBiJSON(addr string, onConn func(*rpc2.Client), onDis func(*rpc2.Client)) {