fix: use production logging profile
Deploy im-manager production / deploy (push) Successful in 4m33s
Deploy im-manager production / deploy (push) Successful in 4m33s
This commit is contained in:
@@ -3,6 +3,7 @@ import unittest
|
||||
|
||||
|
||||
WORKFLOW = Path(__file__).resolve().parents[1] / ".gitea/workflows/deploy.yml"
|
||||
CONFIG_TEMPLATE = Path(__file__).resolve().parents[1] / "server/manifest/config/config.template"
|
||||
|
||||
|
||||
class DeployWorkflowContractTest(unittest.TestCase):
|
||||
@@ -34,6 +35,22 @@ class DeployWorkflowContractTest(unittest.TestCase):
|
||||
self.assertNotIn("KUBECONFIG", self.workflow)
|
||||
self.assertNotIn("git.118im.com", self.workflow)
|
||||
|
||||
|
||||
class ProductionConfigContractTest(unittest.TestCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
cls.config = CONFIG_TEMPLATE.read_text(encoding="utf-8")
|
||||
|
||||
def test_disables_debug_surfaces_and_verbose_request_logging(self):
|
||||
self.assertIn(" debug: false", self.config)
|
||||
self.assertNotIn("debug: true", self.config)
|
||||
self.assertIn(' mode: "product"', self.config)
|
||||
self.assertIn(' level: "info"', self.config)
|
||||
self.assertIn(" accessLogEnabled: false", self.config)
|
||||
self.assertIn(" pprofEnabled: false", self.config)
|
||||
self.assertIn(" stdout: false", self.config)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user