Sfoglia il codice sorgente

Add string test for config

tags/v2.0.0-rc1
9seconds 5 anni fa
parent
commit
21d4f3d101
1 ha cambiato i file con 6 aggiunte e 0 eliminazioni
  1. 6
    0
      config/config_test.go

+ 6
- 0
config/config_test.go Vedi File

@@ -42,6 +42,12 @@ func (suite *ConfigTestSuite) TestParseMinimalConfig() {
42 42
 	suite.Equal("0.0.0.0:3128", conf.BindTo.String())
43 43
 }
44 44
 
45
+func (suite *ConfigTestSuite) TestString() {
46
+	conf, err := config.Parse(suite.ReadConfig("minimal.toml"))
47
+	suite.NoError(err)
48
+	suite.NotEmpty(conf.String())
49
+}
50
+
45 51
 func TestConfig(t *testing.T) {
46 52
 	t.Parallel()
47 53
 	suite.Run(t, &ConfigTestSuite{})

Loading…
Annulla
Salva