MCPcopy Index your code
hub / github.com/foxcpp/maddy / Config

Method Config

tests/t.go:80–98  ·  view source on GitHub ↗

Config sets the configuration to use for the server. It must be called before Run.

(cfg string)

Source from the content-addressed store, hash-verified

78// Config sets the configuration to use for the server. It must be called
79// before Run.
80func (t *T) Config(cfg string) {
81 t.Helper()
82
83 t.cfg = cfg
84
85 if t.servProc != nil {
86 t.Log("Reloading configuration for running server...")
87
88 configPreable := "state_dir " + filepath.Join(t.testDir, "statedir") + "\n" +
89 "runtime_dir " + filepath.Join(t.testDir, "runtimedir") + "\n\n"
90
91 err := os.WriteFile(filepath.Join(t.testDir, "maddy.conf"), []byte(configPreable+t.cfg), os.ModePerm)
92 if err != nil {
93 t.Fatal("Test configuration failed:", err)
94 }
95
96 t.reloadConfig()
97 }
98}
99
100// DNS sets the DNS zones to emulate for the tested server instance.
101//

Callers 15

TestConcurrencyLimitFunction · 0.95
TestPerIPConcurrencyFunction · 0.95
TestImapsqlDeliveryFunction · 0.95
TestImapsqlDeliveryMapFunction · 0.95
TestImapsqlAuthMapFunction · 0.95
TestLMTPClient_Issue308Function · 0.95
TestLDAPInjectionFilterFunction · 0.95
TestDovecotSASLClientFunction · 0.95

Calls 1

reloadConfigMethod · 0.95

Tested by 15

TestConcurrencyLimitFunction · 0.76
TestPerIPConcurrencyFunction · 0.76
TestImapsqlDeliveryFunction · 0.76
TestImapsqlDeliveryMapFunction · 0.76
TestImapsqlAuthMapFunction · 0.76
TestLMTPClient_Issue308Function · 0.76
TestLDAPInjectionFilterFunction · 0.76
TestDovecotSASLClientFunction · 0.76