feat: define latest_tar on federate trait
This commit is contained in:
parent
d8126a9268
commit
202600696a
2 changed files with 6 additions and 1 deletions
|
@ -76,6 +76,9 @@ pub trait Federate: Sync + Send {
|
|||
|
||||
/// publish results in tar ball
|
||||
async fn tar(&self) -> Result<PathBuf, Self::Error>;
|
||||
|
||||
/// get latest tar ball
|
||||
async fn latest_tar(&self) -> Result<PathBuf, Self::Error>;
|
||||
}
|
||||
|
||||
pub fn get_hostname(url: &Url) -> &str {
|
||||
|
|
|
@ -53,7 +53,9 @@ pub async fn adding_forge_works<'a, T: Federate>(
|
|||
.unwrap());
|
||||
|
||||
// tar()
|
||||
ff.tar().await.unwrap();
|
||||
let tar = ff.tar().await.unwrap();
|
||||
let latest = ff.latest_tar().await.unwrap();
|
||||
assert_eq!(tar, latest);
|
||||
|
||||
// delete repository
|
||||
ff.delete_repository(add_repo_msg.owner, add_repo_msg.name, &add_repo_msg.url)
|
||||
|
|
Loading…
Reference in a new issue