コード例 #1
0
ファイル: init.go プロジェクト: calebwashburn/cfbackup
func init() {
	cfbackup.SetPGDumpUtilVersions()
	tileregistry.Register("ops-manager", new(opsmanager.OpsManagerBuilder))
	tileregistry.Register("elastic-runtime", new(elasticruntime.ElasticRuntimeBuilder))
}
コード例 #2
0
		testERWithVersionSpecificFile(installationSettingsFilePath)
		os.Setenv(ERVersionEnvFlag, "")
	})

	Describe("Given: a er version feature toggle", func() {
		Context("when toggled to v1.6", func() {
			versionBoshName := "p-bosh"
			versionPGDump := "/var/vcap/packages/postgres-9.4.2/bin/pg_dump"
			versionPGRestore := "/var/vcap/packages/postgres-9.4.2/bin/pg_restore"
			oldNewDirector := cfbackup.NewDirector

			BeforeEach(func() {
				oldNewDirector = cfbackup.NewDirector
				cfbackup.NewDirector = fakes.NewFakeDirector
				os.Setenv(ERVersionEnvFlag, ERVersion16)
				cfbackup.SetPGDumpUtilVersions()
			})

			AfterEach(func() {
				cfbackup.NewDirector = oldNewDirector
				os.Setenv(ERVersionEnvFlag, "")
				cfbackup.SetPGDumpUtilVersions()
			})

			It("then it should know the correct bosh name for this version", func() {
				Ω(cfbackup.BoshName()).Should(Equal(versionBoshName))
			})

			It("then it should target the proper vendored postgres utils", func() {
				Ω(persistence.PGDmpDumpBin).Should(Equal(versionPGDump))
				Ω(persistence.PGDmpRestoreBin).Should(Equal(versionPGRestore))