fix(接口测试): 修复TCP接口被删除后,仍然可以调用该接口mock的缺陷
--bug=1027499 --user=王孝刚 【接口测试】github#25303,【接口测试】TCP 接口被删除,该TCP接口的MOCK还能被调用 https://www.tapd.cn/55049933/s/1391879
This commit is contained in:
parent
8f2c189efe
commit
041d3817dd
|
@ -216,6 +216,7 @@ public class MsAssertions extends MsTestElement {
|
|||
assertion = new BeanShellAssertion();
|
||||
scriptLanguage = "beanshell";
|
||||
assertion.setProperty(TestElement.TEST_CLASS, BeanShellAssertion.class.getName());
|
||||
assertion.setProperty(TestElement.GUI_CLASS, SaveService.aliasToClass("BeanShellAssertionGui"));
|
||||
assertion.setProperty(BeanShellAssertion.SCRIPT, assertionJSR223.getScript());
|
||||
}
|
||||
assertion.setProperty("scriptLanguage", scriptLanguage);
|
||||
|
|
|
@ -3,8 +3,21 @@
|
|||
<mapper namespace="io.metersphere.base.mapper.ext.ExtMockExpectConfigMapper">
|
||||
|
||||
<select id="selectByProjectIdAndStatusIsOpen" resultType="io.metersphere.base.domain.MockExpectConfigWithBLOBs">
|
||||
SELECT * FROM mock_expect_config WHERE status = 'true' AND mock_config_id IN
|
||||
(SELECT id FROM mock_config WHERE api_path IS NULL AND project_id = #{0} )
|
||||
SELECT
|
||||
m.*
|
||||
FROM
|
||||
mock_expect_config m
|
||||
WHERE
|
||||
m.STATUS = 'true'
|
||||
AND m.mock_config_id IN (
|
||||
SELECT
|
||||
c.id
|
||||
FROM
|
||||
mock_config c
|
||||
INNER JOIN api_definition a ON a.id = c.api_id and a.project_id = c.project_id
|
||||
WHERE
|
||||
c.api_path IS NULL
|
||||
AND c.project_id = #{0} and a.status !='Trash' and a.protocol='TCP')
|
||||
</select>
|
||||
<select id="selectByApiId" resultType="io.metersphere.base.domain.MockExpectConfigWithBLOBs">
|
||||
SELECT * FROM mock_expect_config WHERE mock_config_id IN
|
||||
|
|
Loading…
Reference in New Issue