Esempio n. 1
0
	"github.com/concourse/atc/resource"
	rfakes "github.com/concourse/atc/resource/fakes"
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
)

var _ = Describe("Radar", func() {
	var (
		fakeTracker *rfakes.FakeTracker
		fakeRadarDB *fakes.FakeRadarDB
		interval    time.Duration

		radar *Radar

		resourceConfig atc.ResourceConfig
		savedResource  db.SavedResource

		locker               *fakes.FakeLocker
		readLock             *dbfakes.FakeLock
		writeLock            *dbfakes.FakeLock
		writeImmediatelyLock *dbfakes.FakeLock

		process ifrit.Process
	)

	BeforeEach(func() {
		fakeTracker = new(rfakes.FakeTracker)
		fakeRadarDB = new(fakes.FakeRadarDB)
		locker = new(fakes.FakeLocker)
		interval = 100 * time.Millisecond
Esempio n. 2
0
	"github.com/concourse/atc/resource"
	rfakes "github.com/concourse/atc/resource/fakes"
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
)

var _ = Describe("Radar", func() {
	var (
		epoch time.Time

		fakeTracker *rfakes.FakeTracker
		fakeRadarDB *fakes.FakeRadarDB
		fakeClock   *fakeclock.FakeClock
		interval    time.Duration

		radar *Radar

		resourceConfig atc.ResourceConfig
		savedResource  db.SavedResource

		fakeLease *dbfakes.FakeLease

		process ifrit.Process
	)

	BeforeEach(func() {
		epoch = time.Unix(123, 456).UTC()
		fakeTracker = new(rfakes.FakeTracker)
		fakeRadarDB = new(fakes.FakeRadarDB)
		fakeClock = fakeclock.NewFakeClock(epoch)
		interval = 1 * time.Minute