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:
Arthur Carcano
2026-05-07 11:43:25 +00:00
committed by Alex
parent f757991635
commit a0887afc4f
3 changed files with 52 additions and 0 deletions
+8
View File
@@ -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);