Example #1
0
	"log"
	"net/http"
	"net/url"

	"github.com/cloudfoundry-incubator/stager/cc_client"
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
	"github.com/onsi/gomega/ghttp"
	"github.com/pivotal-golang/lager"
)

var _ = Describe("CC Client", func() {
	var (
		fakeCC *ghttp.Server

		logger   lager.Logger
		ccClient cc_client.CcClient

		stagingGuid string
	)

	BeforeEach(func() {
		fakeCC = ghttp.NewServer()

		logger = lager.NewLogger("fakelogger")
		logger.RegisterSink(lager.NewWriterSink(GinkgoWriter, lager.DEBUG))

		ccClient = cc_client.NewCcClient(fakeCC.URL(), "username", "password", true)

		stagingGuid = "the-staging-guid"
	})
Example #2
0
	"net/http"
	"net/url"

	"github.com/cloudfoundry-incubator/stager/cc_client"
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
	"github.com/onsi/gomega/ghttp"
	"github.com/pivotal-golang/lager"
)

var _ = Describe("CC Client", func() {
	var (
		fakeCC *ghttp.Server

		logger   lager.Logger
		ccClient cc_client.CcClient

		stagingGuid        string
		completionCallback string
	)

	BeforeEach(func() {
		fakeCC = ghttp.NewServer()

		logger = lager.NewLogger("fakelogger")
		logger.RegisterSink(lager.NewWriterSink(GinkgoWriter, lager.DEBUG))

		ccClient = cc_client.NewCcClient(fakeCC.URL(), "username", "password", true)

		stagingGuid = "the-staging-guid"
		completionCallback = ""