예제 #1
0
func (s *HealerSuite) TestContainerHealerShouldBeRegistered(c *gocheck.C) {
	h, err := heal.Get("docker", "container")
	c.Assert(err, gocheck.IsNil)
	c.Assert(h, gocheck.FitsTypeOf, ContainerHealer{})
}
예제 #2
0
func (s *S) TestBootstrapMachineHealerShouldBeRegistered(c *gocheck.C) {
	h, err := heal.Get("bootstrap")
	c.Assert(err, gocheck.IsNil)
	c.Assert(h, gocheck.FitsTypeOf, bootstrapMachineHealer{})
}
예제 #3
0
func (s *S) TestELBInstanceHealerShouldBeRegistered(c *gocheck.C) {
	h, err := heal.Get("elb-instance")
	c.Assert(err, gocheck.IsNil)
	c.Assert(h, gocheck.FitsTypeOf, elbInstanceHealer{})
}
예제 #4
0
func (s *S) TestInstanceMachineShouldBeRegistered(c *gocheck.C) {
	h, err := heal.Get("instance-machine")
	c.Assert(err, gocheck.IsNil)
	c.Assert(h, gocheck.FitsTypeOf, instanceMachineHealer{})
}
예제 #5
0
func (s *S) TestZookeeperHealerShouldBeRegistered(c *gocheck.C) {
	h, err := heal.Get("zookeeper")
	c.Assert(err, gocheck.IsNil)
	c.Assert(h, gocheck.FitsTypeOf, zookeeperHealer{})
}
예제 #6
0
func (s *S) TestInstanceUnitShouldBeRegistered(c *gocheck.C) {
	h, err := heal.Get("instance-unit")
	c.Assert(err, gocheck.IsNil)
	c.Assert(h, gocheck.FitsTypeOf, instanceUnitHealer{})
}
예제 #7
0
func (s *S) TestBootstrapInstanceIdHealerShouldBeRegistered(c *gocheck.C) {
	h, err := heal.Get("bootstrap-instanceid")
	c.Assert(err, gocheck.IsNil)
	c.Assert(h, gocheck.FitsTypeOf, bootstrapInstanceIdHealer{})
}
예제 #8
0
func (s *S) TestInstanceAgentsConfigHealerShouldBeRegistered(c *gocheck.C) {
	h, err := heal.Get("instance-agents-config")
	c.Assert(err, gocheck.IsNil)
	c.Assert(h, gocheck.FitsTypeOf, instanceAgentsConfigHealer{})
}
예제 #9
0
파일: heal.go 프로젝트: kaiquewdev/tsuru
func healer(w http.ResponseWriter, r *http.Request, t *auth.Token) error {
	healer, _ := heal.Get(r.URL.Query().Get(":healer"))
	w.WriteHeader(http.StatusOK)
	return healer.Heal()
}
예제 #10
0
파일: healer_test.go 프로젝트: nemx/tsuru
func (s *S) TestBootstrapProvisionHealerShouldBeRegistered(c *gocheck.C) {
	h, err := heal.Get("juju", "bootstrap-provision")
	c.Assert(err, gocheck.IsNil)
	c.Assert(h, gocheck.FitsTypeOf, bootstrapProvisionHealer{})
}