Esempio n. 1
0
import (
	"fmt"

	"github.com/cloudfoundry-incubator/routing-api"
	"github.com/cloudfoundry-incubator/routing-api/handlers"
	"github.com/cloudfoundry-incubator/routing-api/models"

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

var _ = Describe("Validator", func() {
	var (
		validator handlers.Validator
		routes    []models.Route
		maxTTL    int
	)

	BeforeEach(func() {
		validator = handlers.NewValidator()
		maxTTL = 50

		routes = []models.Route{
			{
				Route:           "http://127.0.0.1/a/valid/route",
				IP:              "127.0.0.1",
				Port:            8080,
				TTL:             maxTTL,
				LogGuid:         "log_guid",
				RouteServiceUrl: "https://my-rs.example.com",
Esempio n. 2
0
import (
	"fmt"

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

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

var _ = Describe("Validator", func() {
	var (
		validator handlers.Validator
		routes    []db.Route
		maxTTL    int
	)

	BeforeEach(func() {
		validator = handlers.NewValidator()
		maxTTL = 50

		routes = []db.Route{
			{
				Route:           "http://127.0.0.1/a/valid/route",
				IP:              "127.0.0.1",
				Port:            8080,
				TTL:             maxTTL,
				LogGuid:         "log_guid",
				RouteServiceUrl: "https://my-rs.example.com",
Esempio n. 3
0
import (
	"fmt"

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

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

var _ = Describe("Validator", func() {
	var (
		validator handlers.Validator
		routes    []db.Route
		maxTTL    int
	)

	BeforeEach(func() {
		validator = handlers.NewValidator()
		maxTTL = 50

		routes = []db.Route{
			{
				Route:           "http://127.0.0.1/a/valid/route",
				IP:              "127.0.0.1",
				Port:            8080,
				TTL:             maxTTL,
				LogGuid:         "log_guid",
				RouteServiceUrl: "https://my-rs.example.com",