fix(ci): deploy olons server from managed compose env
Deploy olons-server production / deploy (push) Successful in 32s

This commit is contained in:
Your Name
2026-10-20 17:49:03 +08:00
parent ba87d70478
commit cdebd0a404
2 changed files with 21 additions and 54 deletions
+14 -4
View File
@@ -35,12 +35,22 @@ class DeployWorkflowContractTest(unittest.TestCase):
self.assertNotIn("git.118im.com", self.workflow)
def test_uses_internal_im_endpoints_for_server_calls(self):
self.assertIn("OLONS_IM_BASE_URL=http://im-server:6060", self.workflow)
self.assertIn("OLONS_IM_HTTP_API_URL=http://im-server:6060/v1/im", self.workflow)
self.assertIn("OLONS_IM_WS_URL=ws://im-server:6060/v0/channels", self.workflow)
self.assertIn("OLONS_IM_FILE_URL=http://im-server:6060/v0/file", self.workflow)
self.assertIn('"$OLONS_IM_BASE_URL" = "http://im-server:6060"', self.workflow)
self.assertIn('"$OLONS_IM_HTTP_API_URL" = "http://im-server:6060/v1/im"', self.workflow)
self.assertIn('"$OLONS_IM_WS_URL" = "ws://im-server:6060/v0/channels"', self.workflow)
self.assertIn('"$OLONS_IM_FILE_URL" = "http://im-server:6060/v0/file"', self.workflow)
self.assertNotIn("OLONS_IM_BASE_URL=https://im-api.yuexuan.shop", self.workflow)
def test_deploy_uses_managed_compose_environment_without_secret_overlay(self):
self.assertNotIn(".env.olons-server", self.workflow)
self.assertNotIn("compose.olons-server-secret.yaml", self.workflow)
self.assertNotIn("INTERNAL_API_HOTGO_SECRET", self.workflow)
self.assertNotIn("OLONS_IM_API_KEY=", self.workflow)
self.assertIn("docker compose pull olons-server", self.workflow)
self.assertIn("docker compose up -d --no-deps --wait olons-server", self.workflow)
self.assertIn('test "$OLONS_IM_TENANT_CODE" = "default"', self.workflow)
self.assertIn('test "$OLONS_SERVER_DEFAULT_TENANT_ID" = "0"', self.workflow)
if __name__ == "__main__":
unittest.main()