func (s *S) TestProvisionerDestroyEmptyUnit(c *gocheck.C) { fexec := &etesting.FakeExecutor{} setExecut(fexec) defer setExecut(nil) app := testing.NewFakeApp("myapp", "python", 0) app.AddUnit(&testing.FakeUnit{}) var p dockerProvisioner p.Provision(app) err := p.Destroy(app) c.Assert(err, gocheck.IsNil) }
func (s *S) TestFakeAppAddUnit(c *check.C) { app := NewFakeApp("jean", "mj", 0) app.AddUnit(provision.Unit{ID: "jean-0"}) c.Assert(app.units, check.HasLen, 1) }