Catalogue range selon les categories des connecteurs Centreon
build / Images Harbor (catalog-sync, Dockerfile.catalog-sync) (push) Successful in 9m47s
build / Garde-fou (push) Successful in 10m40s
build / Images Harbor (web, Dockerfile) (push) Successful in 13m13s

This commit is contained in:
hcornet committed 2026-09-11 17:56:54 +02:00
1 parent d2f11c3879
commit 23395779ee
57 files changed
+112 -59

No files matched your search

+18
View File
@@ -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}"
+2 -2
View File
@@ -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"