mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-17 17:17:47 +00:00
Add fuzing for AdminApiToken CRDT (#1443)
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/1443 Reviewed-by: Alex <lx@deuxfleurs.fr>
This commit is contained in:
@@ -51,6 +51,14 @@ mod v2 {
|
||||
|
||||
pub use v2::*;
|
||||
|
||||
#[cfg(feature = "arbitrary")]
|
||||
impl<'a> arbitrary::Arbitrary<'a> for AdminApiTokenScope {
|
||||
fn arbitrary(u: &mut arbitrary::Unstructured<'a>) -> arbitrary::Result<Self> {
|
||||
let set: std::collections::BTreeSet<String> = arbitrary::Arbitrary::arbitrary(u)?;
|
||||
Ok(AdminApiTokenScope(set.into_iter().collect()))
|
||||
}
|
||||
}
|
||||
|
||||
impl Crdt for AdminApiTokenParams {
|
||||
fn merge(&mut self, o: &Self) {
|
||||
self.name.merge(&o.name);
|
||||
|
||||
Reference in New Issue
Block a user