func (s *HealerSuite) TestContainerHealerShouldBeRegistered(c *gocheck.C) {
	h, err := heal.Get("docker", "container")
	c.Assert(err, gocheck.IsNil)
	c.Assert(h, gocheck.FitsTypeOf, ContainerHealer{})
}
Esempio n. 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{})
}
Esempio n. 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{})
}
Esempio n. 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{})
}
Esempio n. 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{})
}
Esempio n. 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{})
}
Esempio n. 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{})
}
Esempio n. 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{})
}
Esempio n. 9
0
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()
}
Esempio n. 10
0
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{})
}