Catalogue range selon les categories des connecteurs Centreon
This commit is contained in:
1 parent
d2f11c3879
commit
23395779ee
57 files changed
+112
-59
No files matched your search
@@ -150,3 +150,21 @@ def test_chaque_pack_produit_un_plan_valide():
|
||||
if erreurs:
|
||||
fautifs[pack.id] = erreurs
|
||||
assert not fautifs, fautifs
|
||||
|
||||
|
||||
def test_les_categories_sont_celles_de_centreon():
|
||||
"""Un pack doit se ranger la ou on ira le chercher dans la documentation Centreon."""
|
||||
from enclume.catalog import CATEGORIES
|
||||
|
||||
catalogue = Catalog("catalog")
|
||||
inconnues = {p.id: p.category for p in catalogue.packs.values() if p.category not in CATEGORIES}
|
||||
assert not inconnues, inconnues
|
||||
|
||||
|
||||
def test_le_repertoire_correspond_a_la_categorie():
|
||||
"""Les soumissions ecrivent dans catalog/<categorie>/ : l'arborescence doit suivre."""
|
||||
import os
|
||||
|
||||
for pack in Catalog("catalog").packs.values():
|
||||
repertoire = os.path.basename(os.path.dirname(pack.source_file))
|
||||
assert repertoire == pack.category, f"{pack.id} : {repertoire} != {pack.category}"
|
||||
@@ -15,7 +15,7 @@ import pytest
|
||||
PACK_VALIDE = """
|
||||
id: app-rabbitmq
|
||||
name: RabbitMQ
|
||||
category: application
|
||||
category: applications
|
||||
status: to-verify
|
||||
plugin: centreon_rabbitmq_restapi.pl
|
||||
description: Supervision d'un broker RabbitMQ via son API de management.
|
||||
@@ -237,7 +237,7 @@ def test_publication_ouvre_une_demande_de_fusion(app, monkeypatch):
|
||||
assert resultat["url_pr"].endswith("/pulls/7")
|
||||
|
||||
creation, demande = appels
|
||||
assert creation[1].endswith("catalog/application/app-rabbitmq.yml")
|
||||
assert creation[1].endswith("catalog/applications/app-rabbitmq.yml")
|
||||
assert creation[2]["new_branch"].startswith("pack/app-rabbitmq-")
|
||||
assert demande[2]["head"] == creation[2]["new_branch"]
|
||||
assert demande[2]["base"] == "main"
|
||||
|
||||
Reference in new issue
Block a user