fix(接口测试): 修改 cURL 格式错误问题
This commit is contained in:
parent
394bd7aa20
commit
628896bd76
|
@ -151,14 +151,14 @@ public class KubernetesProvider {
|
|||
.writingOutput(System.out)
|
||||
.writingError(System.err)
|
||||
.withTTY()
|
||||
.usingListener(new SimpleListener(runRequest))
|
||||
.usingListener(new SimpleListener(runRequest, client))
|
||||
.exec(SHELL_COMMAND, "-c", command);
|
||||
} catch (Exception e) {
|
||||
LogUtils.error("Failed to execute command on pod {} ", pod.getMetadata().getName(), e);
|
||||
}
|
||||
}
|
||||
|
||||
private record SimpleListener(Object runRequest) implements ExecListener {
|
||||
private record SimpleListener(Object runRequest, KubernetesClient client) implements ExecListener {
|
||||
@Override
|
||||
public void onOpen() {
|
||||
LogUtils.info("K8s 开启监听");
|
||||
|
@ -175,6 +175,8 @@ public class KubernetesProvider {
|
|||
@Override
|
||||
public void onClose(int code, String reason) {
|
||||
LogUtils.info("K8s 监听关闭:code=" + code + ", reason=" + reason);
|
||||
// 关闭客户端
|
||||
client.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -227,7 +229,7 @@ public class KubernetesProvider {
|
|||
"-X POST -d '%s' " +
|
||||
"--connect-timeout %d " +
|
||||
"--max-time %d " +
|
||||
"--retry-max-time %d" +
|
||||
"--retry-max-time %d " +
|
||||
"--retry %d " +
|
||||
"%s%s",
|
||||
optToken, // otp-token
|
||||
|
|
Loading…
Reference in New Issue