Exemple #1
0
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
	"github.com/onsi/gomega/gbytes"
)

var _ = Describe("Depot", func() {
	const (
		defaultMemoryMB = 256
		defaultDiskMB   = 256
	)

	var (
		depotClient     executor.Client
		logger          lager.Logger
		fakeClock       *fakeclock.FakeClock
		eventHub        *efakes.FakeHub
		allocationStore depot.AllocationStore
		gardenStore     *fakes.FakeGardenStore
		resources       executor.ExecutorResources
		lockManager     *fakelockmanager.FakeLockManager
	)

	BeforeEach(func() {
		logger = lagertest.NewTestLogger("test")

		fakeClock = fakeclock.NewFakeClock(time.Now())

		eventHub = new(efakes.FakeHub)

		allocationStore = allocationstore.NewAllocationStore(fakeClock, eventHub)

		gardenStore = new(fakes.FakeGardenStore)
Exemple #2
0
	"github.com/pivotal-golang/lager/lagertest"
	"github.com/tedsuo/ifrit"
	"github.com/tedsuo/ifrit/ginkgomon"
	"github.com/tedsuo/ifrit/grouper"

	"github.com/cloudfoundry-incubator/garden"
)

var _ = Describe("Executor/Garden", func() {
	const pruningInterval = 500 * time.Millisecond
	const ownerName = "executor"

	var (
		executorClient       executor.Client
		process              ifrit.Process
		runner               ifrit.Runner
		gardenCapacity       garden.Capacity
		exportNetworkEnvVars bool
		cachePath            string
	)

	BeforeEach(func() {
		var err error
		cachePath, err = ioutil.TempDir("", "executor-tmp")
		Expect(err).NotTo(HaveOccurred())
	})

	JustBeforeEach(func() {
		var err error

		config := executorinit.DefaultConfiguration
		config.GardenNetwork = "tcp"