Revue statique, conventions documentees, construction arm64 limitee aux versions et cache de couches
build / Garde-fou (pull_request) Successful in 9m21s
build / Images Harbor (catalog-sync, Dockerfile.catalog-sync) (pull_request) Skipped
build / Images Harbor (web, Dockerfile) (pull_request) Skipped
build / Garde-fou (push) Successful in 9m20s
build / Images Harbor (catalog-sync, Dockerfile.catalog-sync) (push) Successful in 9m44s
build / Images Harbor (web, Dockerfile) (push) Successful in 13m7s

This commit is contained in:
hcornet committed 2026-09-10 18:28:29 +02:00
1 parent 6d02ec0c18
commit acf72da7f8
16 files changed
+193 -46

No files matched your search

+3 -4
View File
@@ -1,6 +1,5 @@
"""Garde-fous minimaux : ce qui casserait silencieusement le code genere."""
import json
from enclume.catalog import Catalog
from enclume.generator import build_plan, render_bundle
@@ -32,7 +31,7 @@ def test_prefixe_applique_aux_references():
projet = projet_exemple()
projet.prefix = "ACME-"
lignes = [o.import_line() for o in build_plan(projet).ops if o.obj != "#"]
liaison = [l for l in lignes if l.startswith("STPL;addhosttemplate")][0]
liaison = next(ligne for ligne in lignes if ligne.startswith("STPL;addhosttemplate"))
assert liaison.count("ACME-") == 2
@@ -46,13 +45,13 @@ def test_version_historique_convertie():
def test_macros_trois_champs_sur_ancienne_version():
projet = projet_exemple()
projet.centreon_version = "legacy"
macro = [o for o in build_plan(projet).ops if o.action == "setmacro"][0]
macro = next(o for o in build_plan(projet).ops if o.action == "setmacro")
assert len(macro.values) == 3
def test_echappement_shell_des_macros_centreon():
fichiers = render_bundle(build_plan(projet_exemple()))
ligne = [l for l in fichiers["deploy.sh"].splitlines() if "HOSTADDRESS" in l][0]
ligne = next(x for x in fichiers["deploy.sh"].splitlines() if "HOSTADDRESS" in x)
assert ligne.startswith("clapi -o CMD -a ADD -v '")
+9 -4
View File
@@ -7,7 +7,6 @@ ici, et la CI reste sans service externe.
from __future__ import annotations
import importlib
import json
import pytest
@@ -28,7 +27,9 @@ services:
- name: Queues
alias: Queues
description: Messages en attente
line: "$CENTREONPLUGINS$/centreon_rabbitmq_restapi.pl --plugin=apps::rabbitmq::restapi::plugin --mode=queues --hostname=$HOSTADDRESS$"
line: >-
$CENTREONPLUGINS$/centreon_rabbitmq_restapi.pl
--plugin=apps::rabbitmq::restapi::plugin --mode=queues --hostname=$HOSTADDRESS$
macros:
- {name: WARNING, value: "1000", description: "Seuil warning"}
"""
@@ -41,7 +42,11 @@ def app(tmp_path, monkeypatch):
monkeypatch.setenv("ENCLUME_SECRET_KEY", "cle-de-test")
monkeypatch.setenv("ENCLUME_COOKIE_SECURE", "0")
import enclume.config, enclume.db, enclume.auth, enclume.routes_donnees, enclume.webapp
import enclume.auth
import enclume.config
import enclume.db
import enclume.routes_donnees
import enclume.webapp
for module in (enclume.config, enclume.db, enclume.auth, enclume.routes_donnees, enclume.webapp):
importlib.reload(module)
@@ -276,7 +281,7 @@ def test_page_de_partage_sert_l_editeur(app):
def test_moderation_demande_la_connexion(app):
page = app.test_client().get("/moderation")
assert page.status_code == 200
assert "Connexion requise".encode() in page.data
assert b"Connexion requise" in page.data
def test_url_de_base_encode_les_caracteres_speciaux(monkeypatch):