Dix-neuf packs applicatifs : JMX, API REST, SNMP
This commit is contained in:
1 parent
9debdcdf9c
commit
c46836ab1c
25 files changed
+1107
-5
No files matched your search
@@ -185,6 +185,20 @@ if (erreurs.length === 0) {
|
||||
erreurs.push('catalogue de packs : ' + erreur.message);
|
||||
}
|
||||
|
||||
// Un perimetre cree apres un import doit reprendre le calendrier du projet.
|
||||
try {
|
||||
const ajouts = [...rail.querySelectorAll('button')].filter((b) => b.textContent === '+');
|
||||
ajouts[ajouts.length - 1].click(); // dernier groupe du rail : perimetres
|
||||
await new Promise((r) => setTimeout(r, 20));
|
||||
const projet = window.projetCourant();
|
||||
const dernier = projet.perimetres[projet.perimetres.length - 1];
|
||||
if (projet.calendriers.length && !dernier.calendrier) {
|
||||
erreurs.push('un perimetre neuf ne reprend pas le calendrier du projet');
|
||||
}
|
||||
} catch (erreur) {
|
||||
erreurs.push('creation d un perimetre : ' + erreur.message);
|
||||
}
|
||||
|
||||
// Un champ sans valeur ne doit jamais afficher le mot « undefined ».
|
||||
for (const entree of rail.querySelectorAll('.rail-item')) {
|
||||
principal.innerHTML = '';
|
||||
|
||||
@@ -540,3 +540,29 @@ def test_un_calendrier_du_central_peut_etre_force():
|
||||
lignes = [o.import_line() for o in build_plan(projet).ops if o.obj == "TP"]
|
||||
assert lignes[0].startswith("TP;ADD;24x7;")
|
||||
assert "TP;setparam;24x7;monday;00:00-24:00" in lignes
|
||||
|
||||
|
||||
def test_un_perimetre_sans_calendrier_retombe_sur_celui_du_central():
|
||||
"""Plutot que de ne jamais notifier, il vise 24x7 — et l'avertissement le dit."""
|
||||
projet = Project.from_dict(
|
||||
{"perimetres": [{"name": "Sans calendrier", "calendrier": "", "contacts": ["hcornet"]}]}
|
||||
)
|
||||
assert projet.perimetres[0].calendrier == "24x7"
|
||||
|
||||
messages = [i["message"] for i in validate(projet)]
|
||||
assert any("n'est pas dans le projet" in m for m in messages)
|
||||
|
||||
|
||||
def test_chaque_perimetre_de_pack_a_son_calendrier():
|
||||
"""Sur les 52 packs, aucun perimetre ne doit pointer dans le vide."""
|
||||
from enclume.catalog import Catalog
|
||||
from enclume.packs import pack_to_project
|
||||
|
||||
manquants = []
|
||||
for pack in Catalog("catalog").packs.values():
|
||||
projet = pack_to_project(pack)
|
||||
connus = {c.name for c in projet.calendriers}
|
||||
for perimetre in projet.perimetres:
|
||||
if not perimetre.calendrier or perimetre.calendrier not in connus:
|
||||
manquants.append((pack.id, perimetre.calendrier))
|
||||
assert not manquants, manquants
|
||||
Reference in new issue
Block a user