@@ -50,15 +50,15 @@ func initEnv() {
5050func TestNewReporter (t * testing.T ) {
5151 initEnv ()
5252 assert := assert .New (t )
53- reporter := NewReporter (metrics .DefaultRegistry , "127.0.0.1:8080" , http.Header {"Content-Type" : []string {"application/json" }}, time .Second , & tls.Config {}, "default" , "0.0.1" , "Server" , "" , "" )
53+ reporter := NewReporter (metrics .DefaultRegistry , "127.0.0.1:8080" , http.Header {"Content-Type" : []string {"application/json" }}, time .Second , & tls.Config {}, "default" , "0.0.1" , "Server" , "" )
5454 assert .Equal (reporter .Interval , time .Second )
5555 assert .Equal (reporter .CseMonitorAddr , "127.0.0.1:8080" )
5656 assert .Equal (reporter .Header , http.Header {"Content-Type" : []string {"application/json" }})
5757}
5858func TestCseMonitor (t * testing.T ) {
5959 initEnv ()
6060 assert := assert .New (t )
61- reporter := NewReporter (metrics .DefaultRegistry , "127.0.0.1:8080" , http.Header {"Content-Type" : []string {"application/json" }}, time .Second , & tls.Config {}, "default" , "0.0.1" , "Server" , "" , "" )
61+ reporter := NewReporter (metrics .DefaultRegistry , "127.0.0.1:8080" , http.Header {"Content-Type" : []string {"application/json" }}, time .Second , & tls.Config {}, "default" , "0.0.1" , "Server" , "" )
6262 config .SelfServiceName = "testService"
6363 monitorData := reporter .getData ("default" , "0.0.1" , "testService" , "" , "" , "" )
6464 assert .Equal (monitorData .Name , "testService" )
@@ -67,7 +67,7 @@ func TestCseMonitor(t *testing.T) {
6767func TestCseMonitor2 (t * testing.T ) {
6868 initEnv ()
6969 assert := assert .New (t )
70- reporter := NewReporter (metrics .DefaultRegistry , "127.0.0.1:8080" , http.Header {"Content-Type" : []string {"application/json" }}, time .Second , & tls.Config {}, "default" , "0.0.1" , "Server" , "" , "" )
70+ reporter := NewReporter (metrics .DefaultRegistry , "127.0.0.1:8080" , http.Header {"Content-Type" : []string {"application/json" }}, time .Second , & tls.Config {}, "default" , "0.0.1" , "Server" , "" )
7171 metricCollector := NewCseCollector ("source.Provider.Microservice.SchemaID.OperationId" )
7272 config .SelfServiceName = "testService"
7373
@@ -90,7 +90,7 @@ func TestCseMonitorClient_PostMetrics(t *testing.T) {
9090 initEnv ()
9191 assert := assert .New (t )
9292 config .SelfServiceName = "testService"
93- reporter := NewReporter (metrics .DefaultRegistry , "127.0.0.1:8080" , http.Header {"Content-Type" : []string {"application/json" }}, time .Second , & tls.Config {}, "default" , "0.0.1" , "Server" , "" , "" )
93+ reporter := NewReporter (metrics .DefaultRegistry , "127.0.0.1:8080" , http.Header {"Content-Type" : []string {"application/json" }}, time .Second , & tls.Config {}, "default" , "0.0.1" , "Server" , "" )
9494 cseMonitClient := NewCseMonitorClient (http.Header {"Content-Type" : []string {"application/json" }}, "http://127.0.0.1:9098" , & tls.Config {}, "v2" )
9595 assert .Equal (cseMonitClient .URL , "http://127.0.0.1:9098" )
9696 assert .Equal (cseMonitClient .Header , http.Header {"Content-Type" : []string {"application/json" }})
0 commit comments