Skip to content

Commit e3cfa7e

Browse files
fix(*): allow revision and version to be optional (#164)
Signed-off-by: Brooks Townsend <brooks@cosmonic.com>
1 parent 24d1996 commit e3cfa7e

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/events/data.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ pub struct ActorClaims {
6666
pub issuer: String,
6767
pub name: String,
6868
pub not_before_human: String,
69-
pub revision: usize,
69+
pub revision: Option<usize>,
7070
// NOTE: This doesn't need a custom deserialize because unlike provider claims, these come out
7171
// in an array
7272
pub tags: Option<Vec<String>>,
73-
pub version: String,
73+
pub version: Option<String>,
7474
}
7575

7676
#[derive(Debug, Serialize, Deserialize, Default, Eq, PartialEq, Clone)]

src/scaler/simplescaler.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,9 +470,9 @@ mod test {
470470
issuer: "AASDASDIAMAREALISSUER".to_string(),
471471
name: "real actor".to_string(),
472472
not_before_human: "N/A".to_string(),
473-
revision: 1,
473+
revision: Some(1),
474474
tags: None,
475-
version: "v0.1.0".to_string(),
475+
version: Some("v0.1.0".to_string()),
476476
}
477477
}
478478
}

src/workers/event.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,7 +1169,7 @@ mod test {
11691169
capabilites: vec!["empire:command".into()],
11701170
issuer: "Sheev Palpatine".into(),
11711171
name: "Grand Moff Tarkin".into(),
1172-
version: "0.1.0".into(),
1172+
version: Some("0.1.0".into()),
11731173
..Default::default()
11741174
},
11751175
image_ref: "coruscant.galactic.empire/tarkin:0.1.0".into(),
@@ -1185,7 +1185,7 @@ mod test {
11851185
capabilites: vec!["empire:command".into(), "force_user:sith".into()],
11861186
issuer: "Sheev Palpatine".into(),
11871187
name: "Darth Vader".into(),
1188-
version: "0.1.0".into(),
1188+
version: Some("0.1.0".into()),
11891189
..Default::default()
11901190
},
11911191
image_ref: "coruscant.galactic.empire/vader:0.1.0".into(),

0 commit comments

Comments
 (0)