DiskMb: 512, Lifecycle: "docker", EnvironmentVariables: []*models.EnvironmentVariable{ {Name: "foo", Value: "bar"}, {Name: "VCAP_APPLICATION", Value: "{\"application_name\":\"my-app\"}"}, }, DropletUri: "http://the-droplet.uri.com", RootFs: "some-stack", CompletionCallbackUrl: "http://api.cc.com/v1/tasks/complete", Command: "the-start-command", EgressRules: egressRules, } }) JustBeforeEach(func() { taskDefinition, err = builder.BuildTask(&newTaskReq) }) Describe("CPU weight calculation", func() { Context("when the memory limit is below the minimum value", func() { BeforeEach(func() { newTaskReq.MemoryMb = recipebuilder.MinCpuProxy - 9999 }) It("returns 1", func() { Expect(taskDefinition.CpuWeight).To(BeEquivalentTo(1)) }) }) Context("when the memory limit is above the maximum value", func() { BeforeEach(func() {