Implement opt-in overlay TUN runtime
This commit is contained in:
parent
c2dee50dae
commit
d9728a326d
15 changed files with 2315 additions and 84 deletions
|
|
@ -905,6 +905,14 @@ impl Store {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn delete_module_state(&self, module: &str) -> Result<(), StoreError> {
|
||||
self.conn.execute(
|
||||
"DELETE FROM module_state WHERE module = ?1",
|
||||
params![module],
|
||||
)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn list_module_states_with_prefix(
|
||||
&self,
|
||||
prefix: &str,
|
||||
|
|
@ -1714,6 +1722,15 @@ mod tests {
|
|||
.len(),
|
||||
1
|
||||
);
|
||||
store
|
||||
.delete_module_state("live-sync:node:laptop:ssh-certs")
|
||||
.expect("delete state");
|
||||
assert_eq!(
|
||||
store
|
||||
.get_module_state("live-sync:node:laptop:ssh-certs")
|
||||
.expect("get deleted state"),
|
||||
None
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
Loading…
Reference in a new issue