Example #1
0
	"testing"
)

var (
	trafficControllerAddress string
	trafficControllerPort    int
	trafficControllerURL     string

	etcdPort int

	consulRunner *consulrunner.ClusterRunner

	listenerPort int
	listenerAddr string
	listener     ifrit.Process
	runner       *ginkgomon.Runner

	listenerPath string

	fakeCC     *ghttp.Server
	etcdRunner *etcdstorerunner.ETCDClusterRunner
	store      storeadapter.StoreAdapter

	bbsClient bbs.Client
	logger    *lagertest.TestLogger
	bbsPath   string
	bbsURL    *url.URL
)

var bbsArgs bbstestrunner.Args
var bbsRunner *ginkgomon.Runner
Example #2
0
	etcdclient "github.com/coreos/go-etcd/etcd"
	. "github.com/onsi/ginkgo"
	"github.com/onsi/ginkgo/config"
	. "github.com/onsi/gomega"
	"github.com/pivotal-golang/clock/fakeclock"
	"github.com/pivotal-golang/lager/lagertest"

	"testing"
)

var etcdPort int
var etcdUrl string
var etcdRunner *etcdstorerunner.ETCDClusterRunner
var storeClient etcd.StoreClient
var fakeStoreClient *fakes.FakeStoreClient
var consulRunner *consulrunner.ClusterRunner
var consulSession *consuladapter.Session

var fakeAuctioneerClient *auctioneerfakes.FakeClient
var fakeRepClient *repfakes.FakeClient
var fakeRepClientFactory *repfakes.FakeClientFactory
var fakeTaskCompletionClient *faketaskworkpool.FakeTaskCompletionClient

var logger *lagertest.TestLogger
var clock *fakeclock.FakeClock
var etcdHelper *etcd_helpers.ETCDHelper
var consulHelper *test_helpers.ConsulHelper

var serviceClient bbs.ServiceClient
var etcdDB db.DB
var etcdDBWithFakeStore db.DB
Example #3
0
	"github.com/cloudfoundry-incubator/diego-ssh/keys"
	. "github.com/onsi/ginkgo"
	"github.com/onsi/ginkgo/config"
	. "github.com/onsi/gomega"
	"github.com/onsi/gomega/gexec"
	"github.com/tedsuo/ifrit"
	"github.com/tedsuo/ifrit/ginkgomon"
)

var (
	sshProxyPath string
	sshdPath     string
	sshdProcess  ifrit.Process

	sshdPort     int
	sshProxyPort int

	hostKeyPem          string
	privateKeyPem       string
	publicAuthorizedKey string
	consulRunner        *consulrunner.ClusterRunner
)

func TestSSHProxy(t *testing.T) {
	RegisterFailHandler(Fail)
	RunSpecs(t, "SSH Proxy Suite")
}

var _ = SynchronizedBeforeSuite(func() []byte {
	sshProxy, err := gexec.Build("github.com/cloudfoundry-incubator/diego-ssh/cmd/ssh-proxy", "-race")
	Expect(err).NotTo(HaveOccurred())
Example #4
0
	"github.com/cloudfoundry/storeadapter/storerunner/etcdstorerunner"
	. "github.com/onsi/ginkgo"
	"github.com/onsi/ginkgo/config"
	. "github.com/onsi/gomega"
	"github.com/onsi/gomega/gexec"
	"github.com/onsi/gomega/ghttp"
	"github.com/tedsuo/ifrit"
	"github.com/tedsuo/ifrit/ginkgomon"
)

var cellID string
var representativePath string
var etcdRunner *etcdstorerunner.ETCDClusterRunner
var etcdPort, natsPort int
var serverPort int
var consulRunner *consulrunner.ClusterRunner
var consulSession *consuladapter.Session

var bbsArgs bbstestrunner.Args
var bbsBinPath string
var bbsURL *url.URL
var bbsRunner *ginkgomon.Runner
var bbsProcess ifrit.Process
var bbsClient bbs.Client
var auctioneerServer *ghttp.Server

func TestRep(t *testing.T) {
	RegisterFailHandler(Fail)
	RunSpecs(t, "Rep Integration Suite")
}
Example #5
0
var etcdPort int
var etcdUrl string
var etcdRunner *etcdstorerunner.ETCDClusterRunner
var etcdClient *etcdclient.Client

var logger lager.Logger

var client bbs.Client
var bbsBinPath string
var bbsAddress string
var bbsArgs testrunner.Args
var bbsRunner *ginkgomon.Runner
var bbsProcess ifrit.Process
var consulSession *consuladapter.Session
var consulRunner *consulrunner.ClusterRunner
var etcdHelper *etcd_helpers.ETCDHelper
var auctioneerServer *ghttp.Server

func TestBBS(t *testing.T) {
	RegisterFailHandler(Fail)
	RunSpecs(t, "BBS Cmd Suite")
}

var _ = SynchronizedBeforeSuite(
	func() []byte {
		bbsConfig, err := gexec.Build("github.com/cloudfoundry-incubator/bbs/cmd/bbs", "-race")
		Expect(err).NotTo(HaveOccurred())
		return []byte(bbsConfig)
	},
	func(bbsConfig []byte) {
Example #6
0
)

var (
	etcdPort    int
	etcdUrl     string
	etcdRunner  *etcdstorerunner.ETCDClusterRunner
	etcdClient  *etcdclient.Client
	storeClient etcd.StoreClient

	logger lager.Logger

	client              bbs.InternalClient
	bbsBinPath          string
	bbsAddress          string
	bbsHealthAddress    string
	bbsPort             int
	bbsURL              *url.URL
	bbsArgs             testrunner.Args
	bbsRunner           *ginkgomon.Runner
	bbsProcess          ifrit.Process
	consulRunner        *consulrunner.ClusterRunner
	consulClient        consuladapter.Client
	consulHelper        *test_helpers.ConsulHelper
	auctioneerServer    *ghttp.Server
	testMetricsListener net.PacketConn
	testMetricsChan     chan *events.Envelope

	sqlProcess ifrit.Process
	sqlRunner  sqlrunner.SQLRunner
)

func TestBBS(t *testing.T) {
Example #7
0
	"github.com/onsi/ginkgo/config"
	. "github.com/onsi/gomega"
	"github.com/onsi/gomega/gexec"
	"github.com/onsi/gomega/ghttp"
)

var (
	listenerPath string

	bbsURL  *url.URL
	fakeBBS *ghttp.Server
)

var natsPort int

var consulRunner *consulrunner.ClusterRunner
var consulClient consuladapter.Client

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

var _ = SynchronizedBeforeSuite(func() []byte {
	listener, err := gexec.Build("github.com/cloudfoundry-incubator/nsync/cmd/nsync-listener", "-race")
	Expect(err).NotTo(HaveOccurred())

	payload, err := json.Marshal(map[string]string{
		"listener": listener,
	})
	Expect(err).NotTo(HaveOccurred())
Example #8
0
		exitDuration                = 4 * time.Second
		convergeRepeatInterval      = 500 * time.Millisecond
		taskKickInterval            = convergeRepeatInterval
		expireCompletedTaskDuration = 3 * convergeRepeatInterval
		expirePendingTaskDuration   = 30 * time.Minute
	)

	var (
		binPaths         BinPaths
		etcdRunner       *etcdstorerunner.ETCDClusterRunner
		bbsArgs          bbsrunner.Args
		bbsProcess       ifrit.Process
		bbsClient        bbs.Client
		convergerConfig  *convergerrunner.Config
		convergerProcess ifrit.Process
		runner           *ginkgomon.Runner

		consulRunner  *consulrunner.ClusterRunner
		consulSession *consuladapter.Session

		etcdClient storeadapter.StoreAdapter

		logger lager.Logger
	)

	SynchronizedBeforeSuite(func() []byte {
		convergerBinPath, err := Build("github.com/cloudfoundry-incubator/converger/cmd/converger", "-race")
		Expect(err).NotTo(HaveOccurred())
		bbsBinPath, err := Build("github.com/cloudfoundry-incubator/bbs/cmd/bbs", "-race")
		Expect(err).NotTo(HaveOccurred())
		bytes, err := json.Marshal(BinPaths{
var etcdUrl string
var etcdSSLConfig *etcdstorerunner.SSLConfig
var etcdRunner *etcdstorerunner.ETCDClusterRunner
var etcdClient *etcdclient.Client

var logger lager.Logger

var client bbs.Client
var bbsBinPath string
var bbsAddress string
var bbsURL *url.URL
var bbsArgs testrunner.Args
var bbsRunner *ginkgomon.Runner
var bbsProcess ifrit.Process
var consulSession *consuladapter.Session
var consulRunner *consulrunner.ClusterRunner
var etcdHelper *etcd_helpers.ETCDHelper
var auctioneerServer *ghttp.Server

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

var _ = SynchronizedBeforeSuite(
	func() []byte {
		os.Setenv("GOMAXPROCS", strconv.Itoa(runtime.NumCPU()))
		bbsConfig, err := gexec.Build("github.com/cloudfoundry-incubator/bbs/cmd/bbs", "-race")
		Expect(err).NotTo(HaveOccurred())
		return []byte(bbsConfig)
	},