fix: honor admin internal api toggle
Deploy im-server production / deploy (push) Successful in 4m25s
Deploy im-server production / deploy (push) Successful in 4m25s
This commit is contained in:
@@ -177,7 +177,7 @@
|
||||
}
|
||||
},
|
||||
"admin_internal_api": {
|
||||
"enabled": true,
|
||||
"enabled": $ADMIN_INTERNAL_API_ENABLED,
|
||||
"base_url": "$ADMIN_INTERNAL_API_BASE_URL",
|
||||
"service_name": "$ADMIN_INTERNAL_API_SERVICE_NAME",
|
||||
"secret": "$ADMIN_INTERNAL_API_SECRET",
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
from pathlib import Path
|
||||
import unittest
|
||||
|
||||
|
||||
TEMPLATE = Path(__file__).resolve().parents[1] / "docker/tinode/config.template"
|
||||
|
||||
|
||||
class TinodeConfigTemplateTest(unittest.TestCase):
|
||||
def test_admin_internal_api_enabled_comes_from_environment(self):
|
||||
template = TEMPLATE.read_text(encoding="utf-8")
|
||||
section = template.split('"admin_internal_api": {', 1)[1].split("},", 1)[0]
|
||||
|
||||
self.assertIn('"enabled": $ADMIN_INTERNAL_API_ENABLED', section)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user