Exemplo n.º 1
0
		actualLRP = &models.ActualLRP{
			ActualLRPKey: models.NewActualLRPKey(
				"some-process-guid",
				1138,
				"some-domain",
			),
			ActualLRPInstanceKey: models.NewActualLRPInstanceKey(
				"some-instance-guid",
				"some-cell-id",
			),
		}

		client = new(fake_client.FakeClient)
		logger = lagertest.NewTestLogger("test")

		stopper = lrp_stopper.New(cellID, client, logger)
	})

	Describe("StopInstance", func() {
		var returnedError error

		JustBeforeEach(func() {
			returnedError = stopper.StopInstance(actualLRP.ProcessGuid, actualLRP.InstanceGuid)
		})

		It("succeeds", func() {
			Expect(returnedError).NotTo(HaveOccurred())
		})

		Context("when the executor returns an unexpected error", func() {
			BeforeEach(func() {
Exemplo n.º 2
0
func initializeLRPStopper(guid string, executorClient executor.Client, logger lager.Logger) lrp_stopper.LRPStopper {
	return lrp_stopper.New(guid, executorClient, logger)
}