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