Skip to content

Commit

Permalink
fix IT
Browse files Browse the repository at this point in the history
  • Loading branch information
saimu.msm committed Mar 27, 2024
1 parent 1c6e554 commit 246a775
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,12 @@ private LevelAuthorizationCheckResult checkAlarmBlockDTO(String methodName,
return failCheckResult("invalid tags %s", alarmBlockDTO.getTags());
}
if (StringUtils.isNotEmpty(alarmBlockDTO.getTenant())
&& StringUtils.equals(alarmBlockDTO.getTenant(), tenant)) {
&& !StringUtils.equals(alarmBlockDTO.getTenant(), tenant)) {
return failCheckResult("invalid tenant %s, real tenant %s", alarmBlockDTO.getTenant(),
tenant);
}
if (StringUtils.isNotEmpty(alarmBlockDTO.getWorkspace())
&& StringUtils.equals(alarmBlockDTO.getWorkspace(), workspace)) {
&& !StringUtils.equals(alarmBlockDTO.getWorkspace(), workspace)) {
return failCheckResult("invalid workspace %s, real workspace %s",
alarmBlockDTO.getWorkspace(), workspace);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ public void test_check_rule_name() {
.body(new JSONObject(J.toMap(J.toJson(alarmRuleDTO)))) //
.when() //
.post("/webapi/alarmRule/create") //
.prettyPeek() //
.then() //
.body("success", IS_FALSE) //
.body("message", startsWith("API_SECURITY"));
Expand All @@ -170,6 +171,7 @@ public void test_check_rule_name() {
.body(new JSONObject(J.toMap(J.toJson(alarmRuleDTO)))) //
.when() //
.post("/webapi/alarmRule/update") //
.prettyPeek() //
.then() //
.body("success", IS_FALSE) //
.body("message", startsWith("API_SECURITY"));
Expand Down Expand Up @@ -216,8 +218,7 @@ public void test_rule_delete() {
System.out.println(response.body().print());
response //
.then() //
.body("success", IS_TRUE) //
.body("data", IS_NULL);
.body("success", IS_FALSE);
}

@Order(6)
Expand Down

0 comments on commit 246a775

Please sign in to comment.