func (s *S) TestRebuildRoutesBetweenRouters(c *check.C) { a := app.App{Name: "my-test-app", TeamOwner: s.team.Name} err := app.CreateApp(&a, s.user) c.Assert(err, check.IsNil) err = provisiontest.ProvisionerInstance.AddUnits(&a, 1, "web", nil) c.Assert(err, check.IsNil) oldIp := a.Ip a.Plan = app.Plan{Router: "fake-hc"} _, err = rebuild.RebuildRoutes(&a) c.Assert(err, check.IsNil) c.Assert(a.Ip, check.Not(check.Equals), oldIp) na, err := app.GetByName(a.Name) c.Assert(err, check.IsNil) c.Assert(na.Ip, check.Equals, a.Ip) }