Boavizta / cloud-scanner

📡 Get Boavizta impact data for your AWS usage.
https://boavizta.github.io/cloud-scanner/
GNU Affero General Public License v3.0
35 stars 8 forks source link

Update integration tests to reflects latest values from Boavizta API #589

Closed demeringo closed 1 month ago

demeringo commented 1 month ago

Bug description

Some bug fix on Boavizta API release break integration tests (small changes in returned values of HDD and SSD embedded impacts break the test).

To Reproduce

See https://github.com/Boavizta/cloud-scanner/actions/runs/11294926148/job/31814264196?pr=585

Expected behavior

Update tested values the difference in value does not seems significant.

JSON OUTPUT

Additional context

Related to deployment of Boavizta API v1.3 (the tests are run againts the public API endpoint). https://github.com/Boavizta/boaviztapi/releases/tag/1.3

failures:

---- boavizta_api_v1::tests::get_verbose_raw_impacts_of_a_hdd stdout ----
thread 'boavizta_api_v1::tests::get_verbose_raw_impacts_of_a_hdd' panicked at cloud-scanner-cli/src/boavizta_api_v1.rs:385:9:

json atoms at path ".verbose.impacts.gwp.embedded.min" are not equal:
    lhs:
        0.001184
    rhs:
        0.001183

json atoms at path ".verbose.impacts.gwp.embedded.value" are not equal:
    lhs:
        0.001184
    rhs:
        0.001183

json atoms at path ".verbose.impacts.gwp.embedded.max" are not equal:
    lhs:
        0.001184
    rhs:
        0.001183

json atoms at path ".impacts.gwp.embedded.max" are not equal:
    lhs:
        0.001184
    rhs:
        0.001183

json atoms at path ".impacts.gwp.embedded.value" are not equal:
    lhs:
        0.001184
    rhs:
        0.001183

json atoms at path ".impacts.gwp.embedded.min" are not equal:
    lhs:
        0.001184
    rhs:
        0.001183

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- boavizta_api_v1::tests::get_verbose_raw_impacts_of_a_ssd stdout ----
thread 'boavizta_api_v1::tests::get_verbose_raw_impacts_of_a_ssd' panicked at cloud-scanner-cli/src/boavizta_api_v1.rs:411:9:

json atoms at path ".impacts.pe.embedded.min" are not equal:
    lhs:
        0.01093
    rhs:
        0.01104

json atoms at path ".impacts.pe.embedded.max" are not equal:
    lhs:
        0.06616
    rhs:
        0.06627

json atoms at path ".verbose.impacts.pe.embedded.min" are not equal:
    lhs:
        0.01093
    rhs:
        0.01104

json atoms at path ".verbose.impacts.pe.embedded.max" are not equal:
    lhs:
        0.06616
    rhs:
        0.06627