Page MenuHomeSoftware Heritage

Add a check_vault command
ClosedPublic

Authored by vlorentz on Dec 13 2019, 4:27 PM.

Details

Summary

It picks a random directory, requests its cooking from swh-web,
and waits for it to complete.

First step for T2126.

Depends on D2456 for CI to pass

Test Plan

The tests only check that the output conforms to Icinga's API to the best of my understanding of that API.

Diff Detail

Repository
rDICP Icinga plugins
Branch
check_vault
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 9782
Build 14439: tox-on-jenkinsJenkins
Build 14438: arc lint + arc unit

Event Timeline

vlorentz edited the summary of this revision. (Show Details)
olasd requested changes to this revision.Dec 16 2019, 2:18 PM
olasd added a subscriber: olasd.

I have the feeling that there's a way to factor out the state machine you're using for tests instead of duplicating it in all the tests.

I was about to point out that you should add a timeout, but you're adding that in a subsequent diff, so I guess that's fine.

swh/icinga_plugins/cli.py
28

I think we've usually used dashes rather than underscores here.

swh/icinga_plugins/vault.py
41

Does anything actually raise that exception?

This revision now requires changes to proceed.Dec 16 2019, 2:18 PM
In D2453#58116, @olasd wrote:

I have the feeling that there's a way to factor out the state machine you're using for tests instead of duplicating it in all the tests.

Yeah, it annoys me too, but I don't see a good way to do it

swh/icinga_plugins/cli.py
28

I was mirroring Icinga's doc instead of our conventions, but you're right.

swh/icinga_plugins/vault.py
41

oops, good catch. It will when I next update the diff

This revision is now accepted and ready to land.Dec 16 2019, 3:10 PM

Implemented in D2462. I can merge it with this diff if you prefer.

This revision was automatically updated to reflect the committed changes.