mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-07-02 07:02:16 +00:00
Merge pull request #13051 from burgerdev/dont-modify-initdata
runtime-rs: don't modify initdata from annotation
This commit is contained in:
@@ -246,7 +246,7 @@ pub fn add_hypervisor_initdata_overrides(initdata_annotation: &str) -> Result<St
|
||||
return Ok("".to_string());
|
||||
}
|
||||
|
||||
decode_initdata(initdata_annotation)?.to_string()
|
||||
decode_raw_initdata(initdata_annotation).context("decoding initdata annotation failed")
|
||||
}
|
||||
|
||||
use std::io::Write;
|
||||
@@ -335,7 +335,9 @@ url = 'http://kbs-service.xxx.cluster.local:8080'
|
||||
assert!(result.is_err());
|
||||
|
||||
let error = result.unwrap_err();
|
||||
assert!(error.to_string().contains("base64 decode"));
|
||||
assert!(error
|
||||
.chain()
|
||||
.any(|e| e.to_string().contains("base64 decode")));
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -348,7 +350,9 @@ url = 'http://kbs-service.xxx.cluster.local:8080'
|
||||
assert!(result.is_err());
|
||||
|
||||
let error = result.unwrap_err();
|
||||
assert!(error.to_string().contains("gz decoder failed"));
|
||||
assert!(error
|
||||
.chain()
|
||||
.any(|e| e.to_string().contains("gz decoder failed")));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user