MCPcopy
hub / github.com/yusing/godoxy / TestFindRouteByDomainsExactMatch

Function TestFindRouteByDomainsExactMatch

internal/entrypoint/entrypoint_test.go:140–162  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

138}
139
140func TestFindRouteByDomainsExactMatch(t *testing.T) {
141 ep := NewTestEntrypoint(t, nil)
142 ep.SetFindRouteDomains([]string{
143 ".domain.com",
144 ".sub.domain.com",
145 })
146
147 addRoute(t, "app1.foo.bar")
148
149 tests := []string{
150 "app1.foo.bar", // exact match
151 "app1.foo.bar.domain.com",
152 "app1.foo.bar.sub.domain.com",
153 }
154 testsNoMatch := []string{
155 "sub.app1.foo.bar",
156 "sub.app1.foo.bar.com",
157 "app1.domain.com",
158 "app1.sub.domain.com",
159 }
160
161 run(t, ep, tests, testsNoMatch)
162}
163
164func TestFindRouteWithPort(t *testing.T) {
165 t.Run("AnyDomain", func(t *testing.T) {

Callers

nothing calls this directly

Calls 4

NewTestEntrypointFunction · 0.85
addRouteFunction · 0.85
SetFindRouteDomainsMethod · 0.80
runFunction · 0.70

Tested by

no test coverage detected