Exemple #1
0
func makeConnection() fargo.EurekaConnection {
	var c fargo.Config
	c.Eureka.ServiceUrls = []string{"http://172.17.0.2:8080/eureka/v2"}
	c.Eureka.ConnectTimeoutSeconds = 10
	c.Eureka.PollIntervalSeconds = 30
	c.Eureka.Retries = 3
	return fargo.NewConnFromConfig(c)
}
Exemple #2
0
func TestConnectionCreation(t *testing.T) {
	Convey("Pull applications", t, func() {
		cfg, err := fargo.ReadConfig("./config_sample/local.gcfg")
		So(err, ShouldBeNil)
		e := fargo.NewConnFromConfig(cfg)
		apps, err := e.GetApps()
		So(err, ShouldBeNil)
		So(len(apps["EUREKA"].Instances), ShouldEqual, 2)
	})
}