Support the Container Runner purpose identity in updates
This commit is contained in:
parent
8556954e7c
commit
b93fb280b7
1 changed files with 6 additions and 0 deletions
|
|
@ -153,6 +153,7 @@ fn purpose_variant(identity: &str) -> Result<&'static str, String> {
|
|||
match identity.trim() {
|
||||
"purpose/desktop/gnome" => Ok("gnome"),
|
||||
"purpose/desktop/kde" => Ok("kde"),
|
||||
"purpose/server/container-runner" => Ok("container"),
|
||||
other => Err(format!("unsupported Purpose identity: {other:?}")),
|
||||
}
|
||||
}
|
||||
|
|
@ -366,6 +367,11 @@ fn apply_plan(plan: &Value, download_only: bool) -> Result<(), String> {
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
#[test]
|
||||
fn container_runner_purpose_identity_is_supported() {
|
||||
assert_eq!(purpose_variant("purpose/server/container-runner").unwrap(), "container");
|
||||
assert!(purpose_variant("purpose/server/unknown").is_err());
|
||||
}
|
||||
use super::*;
|
||||
#[test]
|
||||
fn summary_track_is_exact_and_missing_track_fails() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue