Example #1
0
				BeforeEach(func() {
					fakeFs.WriteFileString(comboManifestPath, `
---
name: fake-deployment-name
cloud_provider:
  template:
    name: fake-cpi-job-name
    release: fake-cpi-release-name
  ssh_tunnel:
    host: 54.34.56.8
    port: 22
    user: fake-ssh-user
    private_key: ~/tmp/fake-ssh-key.pem
  mbus: http://fake-mbus-user:[email protected]:6868
`)
					fakeFs.ExpandPathErr = errors.New("fake-expand-error")
				})

				It("returns an error", func() {
					_, err := parser.Parse(comboManifestPath, releaseSetManifest)
					Expect(err).To(HaveOccurred())
					Expect(err.Error()).To(Equal("Expanding private_key path: fake-expand-error"))
				})
			})

			Context("when private_key is not provided", func() {
				BeforeEach(func() {
					fakeFs.WriteFileString(comboManifestPath, fixtures.missingPrivateKeyManifest)
				})

				It("does not expand the path", func() {