"github.com/onsi/gomega/ghttp"

	config_package "github.com/cloudfoundry-incubator/ltc/config"
	"github.com/cloudfoundry-incubator/ltc/receptor_client/fake_receptor_client_creator"
	"github.com/cloudfoundry-incubator/ltc/version"
	"github.com/cloudfoundry-incubator/ltc/version/fake_file_swapper"
	"github.com/cloudfoundry-incubator/receptor"
	"github.com/cloudfoundry-incubator/receptor/fake_receptor"
)

var _ = Describe("VersionManager", func() {
	var (
		fakeFileSwapper           *fake_file_swapper.FakeFileSwapper
		fakeServer                *ghttp.Server
		config                    *config_package.Config
		versionManager            version.VersionManager
		fakeReceptorClientCreator *fake_receptor_client_creator.FakeCreator
		fakeReceptorClient        *fake_receptor.FakeClient

		ltcTempFile *os.File
	)

	BeforeEach(func() {
		fakeFileSwapper = &fake_file_swapper.FakeFileSwapper{}

		fakeServer = ghttp.NewServer()
		fakeServerURL, err := url.Parse(fakeServer.URL())
		Expect(err).NotTo(HaveOccurred())

		fakeServerHost, fakeServerPort, err := net.SplitHostPort(fakeServerURL.Host)
		Expect(err).NotTo(HaveOccurred())