node: remove test

This commit is contained in:
Marius van der Wijden 2024-03-05 14:51:17 +01:00
parent 98104b27a4
commit 880f456630

View file

@ -415,23 +415,6 @@ func TestRegisterHandler_Successful(t *testing.T) {
assert.Equal(t, "success", string(buf)) assert.Equal(t, "success", string(buf))
} }
// Tests that the given handler will not be successfully mounted since no HTTP server
// is enabled for RPC
func TestRegisterHandler_Unsuccessful(t *testing.T) {
cfg := DefaultConfig
cfg.DataDir = t.TempDir()
node, err := New(&cfg)
if err != nil {
t.Fatalf("could not create new node: %v", err)
}
// create and mount handler
handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("success"))
})
node.RegisterHandler("test", "/test", handler)
}
// Tests whether websocket requests can be handled on the same port as a regular http server. // Tests whether websocket requests can be handled on the same port as a regular http server.
func TestWebsocketHTTPOnSamePort_WebsocketRequest(t *testing.T) { func TestWebsocketHTTPOnSamePort_WebsocketRequest(t *testing.T) {
node := startHTTP(t, 0, 0) node := startHTTP(t, 0, 0)