mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-24 18:27:10 +00:00
runtime-rs: Fix issues for empty initdata annotation test
Currently, there are 2 issues for the empty initdata annotation test: - Empty string handling - "\[CDH\] \[ERROR\]: Get Resource failed" not appearing `add_hypervisor_initdata_overrides()` does not handle an empty string, which might lead to panic like: ``` called `Result::unwrap()` on an `Err` value: gz decoder failed Caused by: failed to fill whole buffer ``` This commit makes the function return an empty string for a given empty input and updates the assertion string to one that appears in both go-runtime and runtime-rs. Signed-off-by: Alex Lyn <alex.lyn@antgroup.com> Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
This commit is contained in:
@@ -182,7 +182,7 @@ EOF
|
||||
return 1
|
||||
fi
|
||||
|
||||
assert_logs_contain "${node}" kata "${node_start_time}" "\[CDH\] \[ERROR\]: Get Resource failed"
|
||||
assert_logs_contain "${node}" kata "${node_start_time}" "\[CDH\] \[ERROR\]: Image Client error: Initialize resource provider failed: Get resource failed"
|
||||
}
|
||||
|
||||
teardown() {
|
||||
|
Reference in New Issue
Block a user