"reflect"
	"time"

	"github.com/BurntSushi/migration"
	. "github.com/concourse/atc/db/migrations"
	"github.com/concourse/atc/postgresrunner"
	_ "github.com/lib/pq"
	"github.com/tedsuo/ifrit"

	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
)

var _ = Describe("25ConvertJobBuildConfigToJobPlans", func() {

	var postgresRunner postgresrunner.Runner

	var dbProcess ifrit.Process

	var dbConn *sql.DB

	// explicit type here is important for reflect.ValueOf
	var migrationToTest migration.Migrator = ConvertJobBuildConfigToJobPlans

	var precedingMigrations []migration.Migrator
	var migrationFromSet migration.Migrator

	for _, migration := range Migrations {
		if reflect.ValueOf(migration) == reflect.ValueOf(migrationToTest) {
			migrationFromSet = migration
			break
예제 #2
0
	"github.com/concourse/atc/postgresrunner"
	"github.com/tedsuo/ifrit"
	"github.com/tedsuo/ifrit/ginkgomon"

	"testing"
	"time"
)

func TestAcceptance(t *testing.T) {
	RegisterFailHandler(Fail)
	RunSpecs(t, "Acceptance Suite")
}

var atcBin string

var postgresRunner postgresrunner.Runner
var dbConn db.Conn
var dbProcess ifrit.Process

var sqlDB *db.SQLDB

var agoutiDriver *agouti.WebDriver

var _ = SynchronizedBeforeSuite(func() []byte {
	atcBin, err := gexec.Build("github.com/concourse/atc/cmd/atc")
	Expect(err).NotTo(HaveOccurred())

	return []byte(atcBin)
}, func(b []byte) {
	atcBin = string(b)