示例#1
0
package db_test

import (
	"time"

	"github.com/cloudfoundry-incubator/routing-api/db"
	"github.com/cloudfoundry/storeadapter"

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

var _ = Describe("DB", func() {
	Describe("etcd", func() {
		var (
			etcd  db.DB
			route db.Route
		)

		BeforeEach(func() {
			etcd = db.NewETCD(etcdRunner.NodeURLS())
			route = db.Route{
				Route:   "post_here",
				Port:    7000,
				IP:      "1.2.3.4",
				TTL:     50,
				LogGuid: "my-guid",
			}
			etcd.Connect()
		})

		AfterEach(func() {