[pve-devel] [PATCH installer 10/14] auto-installer: tests: replace left/right with got/expected in output
Stefan Hanreich
s.hanreich at proxmox.com
Thu Jul 11 17:03:11 CEST 2024
On 7/10/24 15:27, Christoph Heiss wrote:
> Makes more sense and makes debugging easier.
>
> Signed-off-by: Christoph Heiss <c.heiss at proxmox.com>
> ---
> proxmox-auto-installer/tests/parse-answer.rs | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/proxmox-auto-installer/tests/parse-answer.rs b/proxmox-auto-installer/tests/parse-answer.rs
> index 450915a..81079b8 100644
> --- a/proxmox-auto-installer/tests/parse-answer.rs
> +++ b/proxmox-auto-installer/tests/parse-answer.rs
> @@ -77,7 +77,7 @@ fn test_parse_answers() {
> let compare: Value = serde_json::from_str(&compare_raw).unwrap();
> if config != compare {
> panic!(
> - "Test {} failed:\nleft: {:#?}\nright: {:#?}\n",
> + "Test {} failed:\ngot: {:#?}\nexpected: {:#?}\n",
> name, config, compare
> );
> }
maybe use assert_eq!() here altogether?
Also above in the file use assert!(!runtime_info.disks.is_empty()) ?
More information about the pve-devel
mailing list