MCPcopy
hub / github.com/cortesi/devd / TestReverseProxyNoInject

Function TestReverseProxyNoInject

inject/inject_test.go:24–35  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

22}
23
24func TestReverseProxyNoInject(t *testing.T) {
25 ci := CopyInject{
26 Within: 100,
27 ContentType: "text/html",
28 Marker: regexp.MustCompile("mark"),
29 Payload: []byte("inject"),
30 }
31 found, dst, err := inject(ci, "imark", "text/plain")
32 if err != nil || found || dst != "imark" {
33 t.Errorf("Unexpected, found:%v dst:%v error:%v", dst, found, err)
34 }
35}
36
37func TestReverseProxy(t *testing.T) {
38 var sniffTests = []struct {

Callers

nothing calls this directly

Calls 1

injectFunction · 0.85

Tested by

no test coverage detected