MCPcopy
hub / github.com/cloudflare/cloudflared / TestSerializeLocalConfig

Function TestSerializeLocalConfig

orchestration/orchestrator_test.go:780–791  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

778}
779
780func TestSerializeLocalConfig(t *testing.T) {
781 c := &newLocalConfig{
782 RemoteConfig: ingress.RemoteConfig{
783 Ingress: ingress.Ingress{},
784 },
785 ConfigurationFlags: map[string]string{"a": "b"},
786 }
787
788 result, err := json.Marshal(c)
789 require.NoError(t, err)
790 require.JSONEq(t, `{"__configuration_flags":{"a":"b"},"ingress":[],"warp-routing":{"connectTimeout":0,"tcpKeepAlive":0}}`, string(result))
791}
792
793func wsEcho(w http.ResponseWriter, r *http.Request) {
794 upgrader := gows.Upgrader{}

Callers

nothing calls this directly

Calls 1

MarshalMethod · 0.45

Tested by

no test coverage detected