瀏覽代碼

Add test for nil for metric prefix

tags/v2.0.0-rc1
9seconds 5 年之前
父節點
當前提交
b91f28d7d9
共有 1 個檔案被更改,包括 6 行新增0 行删除
  1. 6
    0
      config/type_metric_prefix_test.go

+ 6
- 0
config/type_metric_prefix_test.go 查看文件

@@ -17,6 +17,12 @@ type TypeMetricPrefixTestSuite struct {
17 17
 	suite.Suite
18 18
 }
19 19
 
20
+func (suite *TypeMetricPrefixTestSuite) TestUnmarshalNil() {
21
+	typ := &config.TypeMetricPrefix{}
22
+	suite.NoError(typ.UnmarshalText(nil))
23
+	suite.Empty(typ.String())
24
+}
25
+
20 26
 func (suite *TypeMetricPrefixTestSuite) TestUnmarshalFail() {
21 27
 	testData := []string{
22 28
 		"aaa.aaa",

Loading…
取消
儲存