Beispiel #1
0
						Value:     "102400",
					},
					{
						Subsystem: "memory",
						Name:      "memory.limit_in_bytes",
						Value:     "102400",
					},
				},
			))

		})

		Context("when the OOM watcher calls back", func() {
			BeforeEach(func() {
				fakeOomWatcher.WatchStub = func(onOom func()) error {
					onOom()
					return nil
				}
			})

			It("stops the container", func() {
				limits := garden.MemoryLimits{
					LimitInBytes: 102400,
				}

				err := container.LimitMemory(limits)
				Expect(err).ToNot(HaveOccurred())

				Eventually(fakeRunner).Should(HaveExecutedSerially(
					fake_command_runner.CommandSpec{
						Path: containerDir + "/stop.sh",
					},