mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-09-15 22:10:26 +00:00
https://github.com/XTLS/Xray-core/pull/6711#issuecomment-5508683394 --------- Co-authored-by: Raaad1on <djilyawhite@gmail.com>
20 lines
389 B
Go
20 lines
389 B
Go
package blackhole_test
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"github.com/xtls/xray-core/common"
|
|
"github.com/xtls/xray-core/proxy/blackhole"
|
|
)
|
|
|
|
func TestHTTPResponse(t *testing.T) {
|
|
handler, err := blackhole.New(context.Background(), &blackhole.Config{
|
|
Response: &blackhole.Response{Type: "http"},
|
|
})
|
|
common.Must(err)
|
|
if handler == nil {
|
|
t.Error("expected HTTP response handler")
|
|
}
|
|
}
|