本文整理匯總了Golang中github.com/concourse/github-release-resource/fakes.FakeGitHub.DownloadReleaseAssetReturns方法的典型用法代碼示例。如果您正苦於以下問題:Golang FakeGitHub.DownloadReleaseAssetReturns方法的具體用法?Golang FakeGitHub.DownloadReleaseAssetReturns怎麽用?Golang FakeGitHub.DownloadReleaseAssetReturns使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/concourse/github-release-resource/fakes.FakeGitHub
的用法示例。
在下文中一共展示了FakeGitHub.DownloadReleaseAssetReturns方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1:
destDir string
)
BeforeEach(func() {
var err error
githubClient = &fakes.FakeGitHub{}
githubServer = ghttp.NewServer()
command = resource.NewInCommand(githubClient, ioutil.Discard)
tmpDir, err = ioutil.TempDir("", "github-release")
Ω(err).ShouldNot(HaveOccurred())
destDir = filepath.Join(tmpDir, "destination")
githubClient.DownloadReleaseAssetReturns(ioutil.NopCloser(bytes.NewBufferString("some-content")), nil)
inRequest = resource.InRequest{}
})
AfterEach(func() {
Ω(os.RemoveAll(tmpDir)).Should(Succeed())
})
buildRelease := func(id int, tag string, draft bool) *github.RepositoryRelease {
return &github.RepositoryRelease{
ID: github.Int(id),
TagName: github.String(tag),
HTMLURL: github.String("http://google.com"),
Name: github.String("release-name"),
Body: github.String("*markdown*"),