(t *testing.T)
| 40 | } |
| 41 | |
| 42 | func 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 | |
| 58 | func TestBaseConfigValidateBasic(t *testing.T) { |
| 59 | cfg := TestBaseConfig() |
nothing calls this directly
no test coverage detected