本文整理匯總了Golang中github.com/cloudfoundry/bosh-utils/system/fakes.FakeFileSystem.ExpandPathErr方法的典型用法代碼示例。如果您正苦於以下問題:Golang FakeFileSystem.ExpandPathErr方法的具體用法?Golang FakeFileSystem.ExpandPathErr怎麽用?Golang FakeFileSystem.ExpandPathErr使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/cloudfoundry/bosh-utils/system/fakes.FakeFileSystem
的用法示例。
在下文中一共展示了FakeFileSystem.ExpandPathErr方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1:
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() {