usdt-chain-executor 添加联通测试接口,如果CHAIN\_EXECUTOR\_ENABLED=true ,在系统启动时,添加调用验证,并打印调用日志,作为服务可用的日志
This commit is contained in:
1 parent
5ca2cc5202
commit
ee9b209e3d
10 files changed
+166
-24
No files matched your search
@@ -31,9 +31,11 @@ public class IntranetExecutionServerTest {
|
||||
public void allEndpointsRequireServiceAuthentication() throws Exception {
|
||||
start("127.0.0.1");
|
||||
assertEquals(403, request("GET", "/internal/v1/readiness", null, null));
|
||||
assertEquals(403, request("GET", "/internal/v1/connectivity", null, null));
|
||||
assertEquals(403, request("POST", "/internal/v1/executions", "wrong", null));
|
||||
assertEquals(403, request("GET", "/anything", null, null));
|
||||
assertEquals(200, request("GET", "/internal/v1/readiness", TOKEN, null));
|
||||
assertEquals(200, request("GET", "/internal/v1/connectivity", TOKEN, null));
|
||||
assertEquals(202, request("POST", "/internal/v1/executions", TOKEN, null));
|
||||
assertEquals(404, request("GET", "/anything", TOKEN, null));
|
||||
}
|
||||
@@ -49,6 +51,8 @@ public class IntranetExecutionServerTest {
|
||||
public void passwordRotationImmediatelyMakesServiceNotReady() throws Exception {
|
||||
start("127.0.0.1");
|
||||
passwordAccepted = false;
|
||||
// 联通接口不依赖钱包密码,用于区分网络/鉴权故障与业务配置故障。
|
||||
assertEquals(200, request("GET", "/internal/v1/connectivity", TOKEN, null));
|
||||
assertEquals(503, request("GET", "/internal/v1/readiness", TOKEN, null));
|
||||
assertEquals(503, request("POST", "/internal/v1/executions", TOKEN, null));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user