MCPcopy Create free account
hub / github.com/DeAI-Artist/Linkis / TestTLSConfiguration

Function TestTLSConfiguration

config/config_test.go:42–56  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

40}
41
42func TestTLSConfiguration(t *testing.T) {
43 assert := assert.New(t)
44 cfg := DefaultConfig()
45 cfg.SetRoot("/home/user")
46
47 cfg.RPC.TLSCertFile = "file.crt"
48 assert.Equal("/home/user/config/file.crt", cfg.RPC.CertFile())
49 cfg.RPC.TLSKeyFile = "file.key"
50 assert.Equal("/home/user/config/file.key", cfg.RPC.KeyFile())
51
52 cfg.RPC.TLSCertFile = "/abs/path/to/file.crt"
53 assert.Equal("/abs/path/to/file.crt", cfg.RPC.CertFile())
54 cfg.RPC.TLSKeyFile = "/abs/path/to/file.key"
55 assert.Equal("/abs/path/to/file.key", cfg.RPC.KeyFile())
56}
57
58func TestBaseConfigValidateBasic(t *testing.T) {
59 cfg := TestBaseConfig()

Callers

nothing calls this directly

Calls 5

SetRootMethod · 0.80
CertFileMethod · 0.80
KeyFileMethod · 0.80
DefaultConfigFunction · 0.70
EqualMethod · 0.65

Tested by

no test coverage detected