Page MenuHomeSoftware Heritage

vault: Check content-type
ClosedPublic

Authored by vlorentz on Mar 4 2022, 4:16 PM.

Diff Detail

Repository
rDICP Icinga plugins
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 27296
Build 42702: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 42701: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D7300 (id=26409)

Could not rebase; Attempt merge onto c698de2711...

Updating c698de2..c0de368
Fast-forward
 swh/icinga_plugins/tests/test_vault.py   | 98 +++++++++++++++++++++++---------
 swh/icinga_plugins/tests/web_scenario.py | 22 +++----
 swh/icinga_plugins/vault.py              | 91 ++++++++++++++++-------------
 3 files changed, 134 insertions(+), 77 deletions(-)
Changes applied before test
commit c0de368aa7af5e89a6127ff04fc368a07296b1e4
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Mar 4 16:16:02 2022 +0100

    vault: Check content-type

commit de78c81353f3cd51b7a5ea9054ed8b808fe0f3a1
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Mar 4 16:06:36 2022 +0100

    Rename dir_id to DIR_ID
    
    It's a global constant, so it makes more sense to uppercase it.

commit b84160621e62ee2900e8b8ae19f14d6f5c3ff4e7
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Mar 4 16:04:51 2022 +0100

    vault: Un-nest checks
    
    This will allow more checks later, while keeping the code flow linear.

See https://jenkins.softwareheritage.org/job/DICP/job/tests-on-diff/60/ for more details.

olasd added a subscriber: olasd.

Good idea, thanks!

swh/icinga_plugins/tests/test_vault.py
303

hmm, wouldn't a 500 error be plaintext or html rather than gzip?

This revision is now accepted and ready to land.Mar 4 2022, 4:52 PM
swh/icinga_plugins/tests/test_vault.py
303

indeed, that wasn't intentional. But it doesn't matter much

This revision was automatically updated to reflect the committed changes.