From 44fbf1f36250ae956b8bf14985a251a3b46f0d9c Mon Sep 17 00:00:00 2001 From: kjuulh Date: Sun, 18 Feb 2024 01:31:41 +0100 Subject: [PATCH] feat: fix test Signed-off-by: kjuulh --- crates/flux-releaser/src/services/archive.rs | 2 +- crates/flux-releaser/src/services/release_manager.rs | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/crates/flux-releaser/src/services/archive.rs b/crates/flux-releaser/src/services/archive.rs index 3ea37e9..30dd34e 100644 --- a/crates/flux-releaser/src/services/archive.rs +++ b/crates/flux-releaser/src/services/archive.rs @@ -129,7 +129,7 @@ impl Archive { } pub struct ArchiveFile { - content: Vec, + pub content: Vec, } impl From> for ArchiveFile { diff --git a/crates/flux-releaser/src/services/release_manager.rs b/crates/flux-releaser/src/services/release_manager.rs index 8795457..ec33773 100644 --- a/crates/flux-releaser/src/services/release_manager.rs +++ b/crates/flux-releaser/src/services/release_manager.rs @@ -67,7 +67,7 @@ pub mod models; #[cfg(test)] mod test { - use crate::services::archive::MockArchive; + use crate::services::archive::{ArchiveFile, MockArchive}; use crate::services::domain_events::MockDomainEvents; use crate::services::file_reader::{Files, MockFileReader}; use crate::services::file_store::MockFileStore; @@ -95,6 +95,11 @@ mod test { .returning(|_| Ok(Files::default())); let mut archive = MockArchive::default(); + archive.expect_create_archive().times(1).returning(|_| { + Ok(ArchiveFile { + content: Vec::new(), + }) + }); let releaser_manager = ReleaseManager::new(file_reader, file_store, archive, domain_events);