Exemple #1
0
func init() {
	heal.Register("juju", "bootstrap", bootstrapMachineHealer{})
	heal.Register("juju", "bootstrap-provision", bootstrapProvisionHealer{})
	heal.Register("juju", "instance-machine", instanceMachineHealer{})
	heal.Register("juju", "instance-agents-config", instanceAgentsConfigHealer{})
	heal.Register("juju", "instance-unit", instanceUnitHealer{})
	heal.Register("juju", "zookeeper", zookeeperHealer{})
	heal.Register("juju", "elb-instance", elbInstanceHealer{})
	heal.Register("juju", "bootstrap-instanceid", bootstrapInstanceIDHealer{})
}
Exemple #2
0
func (s *HealerSuite) TestHealer(c *gocheck.C) {
	fake := &FakeHealer{}
	p, _ := getProvisioner()
	heal.Register(p, "fake", fake)
	recorder := httptest.NewRecorder()
	request, err := http.NewRequest("GET", "/healers/fake?:healer=fake", nil)
	c.Assert(err, gocheck.IsNil)
	err = healer(recorder, request, nil)
	c.Assert(err, gocheck.IsNil)
	c.Assert(recorder.Code, gocheck.Equals, http.StatusOK)
	c.Assert(fake.called, gocheck.Equals, true)
}