1
0
Fork 0

add download test

This commit is contained in:
Cyborus 2023-12-15 12:00:29 -05:00
parent 2e50a93f1e
commit e725903eb9
No known key found for this signature in database

View file

@ -220,6 +220,14 @@ async fn repo(api: &forgejo_api::Forgejo) -> eyre::Result<()> {
)
.await
.wrap_err("failed to create release attachment")?;
ensure!(
api.download_release_attachment("TestingAdmin", "test", release.id, attachment.id)
.await?
.as_deref()
== Some(b"This is a file!"),
"couldn't download attachment"
);
api.delete_release_attachment("TestingAdmin", "test", release.id, attachment.id)
.await
.wrap_err("failed to deleted attachment")?;