本文整理汇总了Golang中github.com/cloudfoundry/storeadapter/storerunner/etcdstorerunner.ETCDClusterRunner类的典型用法代码示例。如果您正苦于以下问题:Golang ETCDClusterRunner类的具体用法?Golang ETCDClusterRunner怎么用?Golang ETCDClusterRunner使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ETCDClusterRunner类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: TestIntegrationTest
"testing"
"github.com/onsi/ginkgo/config"
"github.com/onsi/gomega/gbytes"
"github.com/onsi/gomega/gexec"
)
func TestIntegrationTest(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "IntegrationTest Suite")
}
var metronSession *gexec.Session
var statsdInjectorSession *gexec.Session
var etcdRunner *etcdstorerunner.ETCDClusterRunner
var etcdPort int
var localIPAddress string
var pathToGoStatsdClient string
var _ = BeforeSuite(func() {
pathToMetronExecutable, err := gexec.Build("metron")
Expect(err).ShouldNot(HaveOccurred())
pathToGoStatsdClient, err = gexec.Build("statsd-injector/tools/statsdGoClient")
Expect(err).NotTo(HaveOccurred())
command := exec.Command(pathToMetronExecutable, "--config=fixtures/metron.json", "--debug")
metronSession, err = gexec.Start(command, gexec.NewPrefixedWriter("[o][metron]", GinkgoWriter), gexec.NewPrefixedWriter("[e][metron]", GinkgoWriter))
示例2: TestMetrics
"os"
"testing"
"github.com/cloudfoundry/dropsonde/factories"
"github.com/cloudfoundry/sonde-go/events"
"github.com/cloudfoundry/storeadapter"
"github.com/cloudfoundry/storeadapter/storerunner/etcdstorerunner"
"github.com/gogo/protobuf/proto"
"github.com/nu7hatch/gouuid"
"github.com/onsi/ginkgo/config"
"github.com/onsi/gomega/gexec"
)
var tmpdir string
var etcdRunner *etcdstorerunner.ETCDClusterRunner
var etcdAdapter storeadapter.StoreAdapter
var port int
var pathToMetronExecutable string
var metronRunner *runners.MetronRunner
func TestMetrics(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Metrics Suite")
}
var _ = SynchronizedBeforeSuite(func() []byte {
metronPath, err := gexec.Build("metron", "-race")
Expect(err).ShouldNot(HaveOccurred())
return []byte(metronPath)
}, func(path []byte) {
示例3: TestTrafficcontroller
package main_test
import (
"github.com/cloudfoundry/storeadapter/storerunner/etcdstorerunner"
. "github.com/onsi/ginkgo"
"github.com/onsi/ginkgo/config"
. "github.com/onsi/gomega"
"testing"
)
var etcdRunner *etcdstorerunner.ETCDClusterRunner
var etcdPort int
var _ = BeforeSuite(func() {
etcdPort = 5800 + (config.GinkgoConfig.ParallelNode-1)*10
etcdRunner = etcdstorerunner.NewETCDClusterRunner(etcdPort, 1)
etcdRunner.Start()
})
var _ = AfterSuite(func() {
etcdRunner.Adapter().Disconnect()
etcdRunner.Stop()
})
func TestTrafficcontroller(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Trafficcontroller Suite")
}
示例4: TestInternal
"github.com/cloudfoundry-incubator/bbs"
bbsrunner "github.com/cloudfoundry-incubator/bbs/cmd/bbs/testrunner"
"github.com/cloudfoundry-incubator/consuladapter/consulrunner"
"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/tedsuo/ifrit"
"github.com/tedsuo/ifrit/ginkgomon"
"testing"
)
var etcdRunner *etcdstorerunner.ETCDClusterRunner
var consulRunner *consulrunner.ClusterRunner
var bbsArgs bbsrunner.Args
var bbsBinPath string
var bbsRunner *ginkgomon.Runner
var bbsProcess ifrit.Process
var bbsClient bbs.Client
func TestInternal(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Internal Suite")
}
var _ = SynchronizedBeforeSuite(func() []byte {
bbsBinPath, err := gexec.Build("github.com/cloudfoundry-incubator/bbs/cmd/bbs")
Expect(err).NotTo(HaveOccurred())
示例5: TestRep
bbstestrunner "github.com/cloudfoundry-incubator/bbs/cmd/bbs/testrunner"
"github.com/cloudfoundry-incubator/consuladapter"
"github.com/cloudfoundry-incubator/consuladapter/consulrunner"
"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)
示例6: TestIntegrationTest
"runtime"
"time"
)
func TestIntegrationTest(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "End-to-end Integration Test Suite")
}
var (
LocalIPAddress string
etcdRunner *etcdstorerunner.ETCDClusterRunner
etcdAdapter storeadapter.StoreAdapter
metronExecutablePath string
dopplerExecutablePath string
trafficControllerExecutablePath string
metronSession *gexec.Session
dopplerSession *gexec.Session
tcSession *gexec.Session
)
var _ = BeforeSuite(func() {
runtime.GOMAXPROCS(runtime.NumCPU())
etcdRunner = etcdstorerunner.NewETCDClusterRunner(49623, 1)
etcdRunner.Start()
etcdAdapter = etcdRunner.Adapter()
metronExecutablePath = buildComponent("metron")
dopplerExecutablePath = buildComponent("doppler")
trafficControllerExecutablePath = buildComponent("trafficcontroller")
示例7: TestStoreAdapter
import (
. "github.com/onsi/ginkgo"
"github.com/onsi/ginkgo/config"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
"github.com/cloudfoundry/storeadapter/storerunner/etcdstorerunner"
"os"
"os/signal"
"testing"
"time"
)
var etcdRunner *etcdstorerunner.ETCDClusterRunner
func TestStoreAdapter(t *testing.T) {
registerSignalHandler()
RegisterFailHandler(Fail)
SetDefaultEventuallyTimeout(5 * time.Second)
RunSpecs(t, "ETCD Store Adapter Suite")
}
var _ = SynchronizedBeforeSuite(func() []byte {
return nil
}, func(encodedBuiltArtifacts []byte) {
etcdPort := 5000 + (config.GinkgoConfig.ParallelNode)*10
etcdRunner = etcdstorerunner.NewETCDClusterRunner(etcdPort, 1)
示例8: TestDB
"fmt"
"io/ioutil"
"net/http"
"github.com/cloudfoundry/storeadapter"
"github.com/cloudfoundry/storeadapter/storerunner/etcdstorerunner"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"testing"
)
var etcdClient storeadapter.StoreAdapter
var etcdPort int
var etcdUrl string
var etcdRunner *etcdstorerunner.ETCDClusterRunner
var etcdVersion = "etcdserver\":\"2.1.1"
var routingAPIBinPath string
func TestDB(t *testing.T) {
RegisterFailHandler(Fail)
etcdPort = 4001 + GinkgoParallelNode()
etcdUrl = fmt.Sprintf("http://127.0.0.1:%d", etcdPort)
etcdRunner = etcdstorerunner.NewETCDClusterRunner(etcdPort, 1)
etcdRunner.Start()
etcdClient = etcdRunner.Adapter()
RunSpecs(t, "DB Suite")
etcdRunner.Stop()
示例9:
"time"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"code.cloudfoundry.org/localip"
"github.com/cloudfoundry/loggregatorlib/loggertesthelper"
"github.com/cloudfoundry/storeadapter"
"github.com/cloudfoundry/storeadapter/storerunner/etcdstorerunner"
ginkgoConfig "github.com/onsi/ginkgo/config"
)
var _ = Describe("Announcer", func() {
var (
localIP string
conf config.Config
etcdRunner *etcdstorerunner.ETCDClusterRunner
etcdAdapter storeadapter.StoreAdapter
)
BeforeSuite(func() {
localIP, _ = localip.LocalIP()
etcdPort := 5500 + ginkgoConfig.GinkgoConfig.ParallelNode*10
etcdRunner = etcdstorerunner.NewETCDClusterRunner(etcdPort, 1, nil)
etcdRunner.Start()
etcdAdapter = etcdRunner.Adapter(nil)
conf = config.Config{
JobName: "doppler_z1",
Index: "0",
示例10: TestIntegrationTest
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
)
const (
APP_ID = "1234"
AUTH_TOKEN = "bearer iAmAnAdmin"
SUBSCRIPTION_ID = "firehose-subscription-1"
TRAFFIC_CONTROLLER_DROPSONDE_PORT = 4566
)
var (
trafficControllerExecPath string
trafficControllerSession *gexec.Session
gnatsdSession *gexec.Session
etcdRunner *etcdstorerunner.ETCDClusterRunner
etcdPort int
localIPAddress string
fakeDoppler *fake_doppler.FakeDoppler
configFile string
)
func TestIntegrationTest(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Traffic Controller Integration Suite")
}
var _ = BeforeSuite(func() {
killEtcdCmd := exec.Command("pkill", "etcd")
killEtcdCmd.Run()
setupEtcdAdapter()
setupDopplerInEtcd()
示例11: TestBulker
. "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 (
bulkerPath string
bbsPath string
bbsURL *url.URL
bbsClient bbs.Client
bbsArgs bbstestrunner.Args
bbsRunner *ginkgomon.Runner
bbsProcess ifrit.Process
etcdRunner *etcdstorerunner.ETCDClusterRunner
consulRunner *consulrunner.ClusterRunner
)
func TestBulker(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Bulker Suite")
}
var _ = SynchronizedBeforeSuite(func() []byte {
bulker, err := gexec.Build("github.com/cloudfoundry-incubator/nsync/cmd/nsync-bulker", "-race")
示例12: TestDB
"github.com/cloudfoundry/storeadapter/storerunner/etcdstorerunner"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"testing"
)
func TestDB(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "DB Suite")
}
var etcdClient storeadapter.StoreAdapter
var etcdPort int
var etcdUrl string
var etcdRunner *etcdstorerunner.ETCDClusterRunner
var routingAPIBinPath string
var _ = BeforeEach(func() {
etcdPort = 4001 + GinkgoParallelNode()
etcdUrl = fmt.Sprintf("http://127.0.0.1:%d", etcdPort)
etcdRunner = etcdstorerunner.NewETCDClusterRunner(etcdPort, 1)
etcdRunner.Start()
etcdClient = etcdRunner.Adapter()
})
var _ = AfterEach(func() {
etcdClient.Disconnect()
etcdRunner.Stop()
})
示例13: TestStore
package store_test
import (
. "github.com/onsi/ginkgo"
"github.com/onsi/ginkgo/config"
. "github.com/onsi/gomega"
"github.com/cloudfoundry/storeadapter/storerunner/etcdstorerunner"
"os"
"os/signal"
"testing"
)
var etcdRunner *etcdstorerunner.ETCDClusterRunner
func TestStore(t *testing.T) {
registerSignalHandler()
RegisterFailHandler(Fail)
etcdRunner = etcdstorerunner.NewETCDClusterRunner(5001+config.GinkgoConfig.ParallelNode, 1)
etcdRunner.Start()
RunSpecs(t, "Store Suite")
etcdRunner.Stop()
}
var _ = BeforeEach(func() {
etcdRunner.Reset()
示例14: TestMain
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
"github.com/onsi/gomega/ghttp"
"testing"
"time"
)
var (
etcdPort int
etcdUrl string
etcdRunner *etcdstorerunner.ETCDClusterRunner
etcdAdapter storeadapter.StoreAdapter
client routing_api.Client
routingAPIBinPath string
routingAPIAddress string
routingAPIArgs testrunner.Args
routingAPIPort uint16
routingAPIIP string
routingAPISystemDomain string
oauthServer *ghttp.Server
oauthServerPort string
)
var etcdVersion = "etcdserver\":\"2.1.1"
func TestMain(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Main Suite")
}
示例15:
"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