Skip to content

Commit

Permalink
fix some error
Browse files Browse the repository at this point in the history
  • Loading branch information
WakeupTsai committed Jun 27, 2018
1 parent ce3faf9 commit 645cf2a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
4 changes: 0 additions & 4 deletions config/testing.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@
"url": "mongodb://localhost:27017/vortex_test"
},
"prometheus": {
<<<<<<< HEAD
"url": "http://localhost:9090"
=======
"url": "http://localhost:30003"
>>>>>>> prometheus service provider
},
"logger": {
"dir": "./logs",
Expand Down
6 changes: 3 additions & 3 deletions src/server/handler_prometheus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ type PrometheusTestSuite struct {
api prometheus.API
}

func (suite *PrometheusTestSuite) SetupTest() {
func (suite *PrometheusTestSuite) SetupSuite() {
cf := config.MustRead("../../config/testing.json")
sp := serviceprovider.New(cf)
sp := serviceprovider.NewForTesting(cf)

//init session
suite.api = sp.Prometheus.API
Expand All @@ -36,7 +36,7 @@ func TestPrometheusTestSuite(t *testing.T) {
suite.Run(t, new(PrometheusTestSuite))
}

func (suite *PrometheusTestSuite) TearDownTest() {
func (suite *PrometheusTestSuite) TearDownSuite() {
}

func (suite *PrometheusTestSuite) TestQueryMetrics() {
Expand Down
3 changes: 3 additions & 0 deletions src/serviceprovider/serviceprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ func NewForTesting(cf config.Config) *Container {
logger.Infof("Connecting to mongodb: %s", cf.Mongo.Url)
mongo := mongo.New(cf.Mongo.Url)

logger.Infof("Connecting to prometheus: %s", cf.Prometheus.Url)
prometheus := prometheus.New(cf.Prometheus.Url)

clientset := fakeclientset.NewSimpleClientset()

sp := &Container{
Expand Down
2 changes: 1 addition & 1 deletion vendor/vendor.json
Original file line number Diff line number Diff line change
Expand Up @@ -1914,4 +1914,4 @@
}
],
"rootPath": "github.com/linkernetworks/vortex"
}
}

0 comments on commit 645cf2a

Please sign in to comment.