func (ad AddRoute) Execute(context executor.Context) error { err := context.RouteManager().AddRoute(ad.Interface, &ad.Destination, ad.Gateway) if err != nil { return fmt.Errorf("add route: %s", err) } return nil }
Describe("AddressManager", func() { It("returns the address manager", func() { Expect(context.AddressManager()).To(Equal(addressManager)) }) }) Describe("LinkFactory", func() { It("returns the link factory", func() { Expect(context.LinkFactory()).To(Equal(linkFactory)) }) }) Describe("RouteManager", func() { It("returns the route manager", func() { Expect(context.RouteManager()).To(Equal(routeManager)) }) }) Describe("SandboxNamespaceRepository", func() { It("returns the SandboxNamespaceRepository", func() { Expect(context.SandboxNamespaceRepository()).To(Equal(sandboxNamespaceRepository)) }) }) Describe("SandboxRepository", func() { It("returns the SandboxRepository", func() { Expect(context.SandboxRepository()).To(Equal(sandboxRepository)) }) })