diff --git a/federate/federate-core/src/lib.rs b/federate/federate-core/src/lib.rs index 3df5619..e7c9443 100644 --- a/federate/federate-core/src/lib.rs +++ b/federate/federate-core/src/lib.rs @@ -76,6 +76,9 @@ pub trait Federate: Sync + Send { /// publish results in tar ball async fn tar(&self) -> Result; + + /// get latest tar ball + async fn latest_tar(&self) -> Result; } pub fn get_hostname(url: &Url) -> &str { diff --git a/federate/federate-core/src/tests.rs b/federate/federate-core/src/tests.rs index 5a2fc80..fed217b 100644 --- a/federate/federate-core/src/tests.rs +++ b/federate/federate-core/src/tests.rs @@ -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)