Beispiel #1
0
		fakeRadarDB.GetPipelineNameReturns("some-pipeline-name")
		radar = NewRadar(fakeTracker, interval, locker, fakeRadarDB)

		resourceConfig = atc.ResourceConfig{
			Name:   "some-resource",
			Type:   "git",
			Source: atc.Source{"uri": "http://example.com"},
		}

		fakeRadarDB.ScopedNameStub = func(thing string) string {
			return "pipeline:" + thing
		}

		fakeRadarDB.GetConfigReturns(atc.Config{
			Resources: atc.ResourceConfigs{
				resourceConfig,
			},
		}, 1, nil)

		savedResource = db.SavedResource{
			Resource: db.Resource{
				Name: "some-resource",
			},
			Paused: false,
		}

		fakeRadarDB.GetResourceReturns(savedResource, nil)

		readLock = new(dbfakes.FakeLock)
		locker.AcquireReadLockReturns(readLock, nil)
Beispiel #2
0
		resourceConfig = atc.ResourceConfig{
			Name:   "some-resource",
			Type:   "git",
			Source: atc.Source{"uri": "http://example.com"},
		}

		fakeRadarDB.ScopedNameStub = func(thing string) string {
			return "pipeline:" + thing
		}

		fakeRadarDB.GetConfigReturns(atc.Config{
			Resources: atc.ResourceConfigs{
				resourceConfig,
			},
			ResourceTypes: atc.ResourceTypes{
				{
					Name:   "some-custom-resource",
					Type:   "docker-image",
					Source: atc.Source{"custom": "source"},
				},
			},
		}, 1, true, nil)

		savedResource = db.SavedResource{
			ID: 39,
			Resource: db.Resource{
				Name: "some-resource",
			},
			Paused: false,
		}

		fakeLease = &dbfakes.FakeLease{}