mirror of
https://github.com/AmbiML/sparrow-kata-full.git
synced 2025-08-30 02:23:19 +00:00
kata-proc-manager: fix unit tests
Change-Id: I7d48e9e31bbc2aae9f899e43bfc3f33331738a42 GitOrigin-RevId: 524e01589e114a541de292e41fa34021e5279703
This commit is contained in:
parent
0db63cfb4f
commit
0633ce6761
@ -201,16 +201,13 @@ mod tests {
|
||||
}
|
||||
}
|
||||
impl ProcessManagerInterface for FakeManager {
|
||||
fn install(&mut self, pkg_buffer: *const u8, pkg_buffer_size: u32) -> Result<Bundle, pme> {
|
||||
fn install(&mut self, pkg_buffer: *const u8, pkg_buffer_size: u32) -> Result<String, pme> {
|
||||
let str = (pkg_buffer as usize).to_string();
|
||||
if self.bundles.contains_key(&str) {
|
||||
return Err(ProcessManagerError::BundleFound);
|
||||
}
|
||||
assert!(self.bundles.insert(str, pkg_buffer_size).is_none());
|
||||
Ok(Bundle {
|
||||
app_id: (pkg_buffer as usize).to_string(),
|
||||
data: [0u8; 64],
|
||||
})
|
||||
Ok((pkg_buffer as usize).to_string())
|
||||
}
|
||||
fn uninstall(&mut self, bundle_id: &str) -> Result<(), pme> {
|
||||
match self.bundles.remove(bundle_id) {
|
||||
|
Loading…
Reference in New Issue
Block a user