|
@@ -0,0 +1,26 @@
|
|
|
|
+import unittest
|
|
|
|
+
|
|
|
|
+import requests
|
|
|
|
+
|
|
|
|
+from util import req, reqGet
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+class MyTest(unittest.TestCase):
|
|
|
|
+ def setUp(self) -> None:
|
|
|
|
+ self.host = "http://127.0.0.1:8080" # local
|
|
|
|
+
|
|
|
|
+ def test623(self):
|
|
|
|
+ """【数据源】新增成功后,获取列表数据返回错误"""
|
|
|
|
+ res = reqGet("https://edsp.rxdptest.k5.bigtree.tech/api/rxdp-xdata-web/dataSource/pageList", {})
|
|
|
|
+ print(len(res['data']))
|
|
|
|
+
|
|
|
|
+ res = req("https://edsp.rxdptest.k5.bigtree.tech/api/rxdp-xdata-web/dataSource",
|
|
|
|
+ {"sourceType": "mysql", "sourceCode": "test23324", "sourceName": "test2134234", "sourceDesc": "",
|
|
|
|
+ "driverName": "com.mysql.cj.jdbc.Driver",
|
|
|
|
+ "jdbcUrl": "jdbc:mysql://mysql.rxdptest.svc.k5.bigtree.zone:3306/rxdp_auth", "username": "cs_user",
|
|
|
|
+ "password": "ceshimima.1",
|
|
|
|
+ "sourceConfig": "{\"driverName\":\"com.mysql.cj.jdbc.Driver\",\"jdbcUrl\":\"jdbc:mysql://mysql.rxdptest.svc.k5.bigtree.zone:3306/rxdp_auth\",\"username\":\"cs_user\",\"password\":\"ceshimima.1\"}"})
|
|
|
|
+ print(res)
|
|
|
|
+
|
|
|
|
+ res = reqGet("https://edsp.rxdptest.k5.bigtree.tech/api/rxdp-xdata-web/dataSource/pageList", {})
|
|
|
|
+ print(len(res['data']))
|