Skip to content

Commit

Permalink
fix: 修改motan插件的e2e测试
Browse files Browse the repository at this point in the history
  • Loading branch information
lahmXu committed Dec 29, 2023
1 parent 9976f94 commit 0dea96b
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,16 @@
package org.apache.shenyu.e2e.testcase.motan;

import com.google.common.collect.Lists;
import io.restassured.http.Method;
import org.apache.shenyu.e2e.engine.scenario.ShenYuScenarioProvider;
import org.apache.shenyu.e2e.engine.scenario.specification.ScenarioSpec;
import org.apache.shenyu.e2e.engine.scenario.specification.ShenYuBeforeEachSpec;
import org.apache.shenyu.e2e.engine.scenario.specification.ShenYuCaseSpec;
import org.apache.shenyu.e2e.engine.scenario.specification.ShenYuScenarioSpec;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import static org.apache.shenyu.e2e.engine.scenario.function.HttpCheckers.exists;

Expand All @@ -43,13 +46,15 @@ public List<ScenarioSpec> get() {
* @return ShenYuScenarioSpec
*/
private ShenYuScenarioSpec testMotanHi() {
Map<String, String> param = new HashMap<>();
param.put("name", "motan");
return ShenYuScenarioSpec.builder()
.name("motan test")
.beforeEachSpec(ShenYuBeforeEachSpec.builder()
.checker(exists("/motan/demo/hi"))
.checker(exists(Method.GET,"/motan/demo/hi", param))
.build())
.caseSpec(ShenYuCaseSpec.builder()
.addExists("/motan/demo/hi")
.addExists(Method.GET,"/motan/demo/hi", param)
.addNotExists("/motan/demo/h")
.build())
.build();
Expand Down

0 comments on commit 0dea96b

Please sign in to comment.