Files

20 lines
389 B
Go
Raw Permalink Normal View History

2020-11-25 19:01:53 +08:00
package blackhole_test
import (
"context"
2020-11-25 19:01:53 +08:00
"testing"
2020-12-04 09:36:16 +08:00
"github.com/xtls/xray-core/common"
"github.com/xtls/xray-core/proxy/blackhole"
2020-11-25 19:01:53 +08:00
)
func TestHTTPResponse(t *testing.T) {
handler, err := blackhole.New(context.Background(), &blackhole.Config{
Response: &blackhole.Response{Type: "http"},
})
2020-11-25 19:01:53 +08:00
common.Must(err)
if handler == nil {
t.Error("expected HTTP response handler")
2020-11-25 19:01:53 +08:00
}
}