Browse Source

[FIX][UT]testVerifyTenantCode assert error (#4460)

* [FIX][UT]testVerifyTenantCode assert error

* [FIX][UT]testVerifyTenantCode assert error

* code smell
pull/3/MERGE
Kirs 4 years ago committed by GitHub
parent
commit
b6ce3cfdf0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/TenantServiceTest.java

10
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/TenantServiceTest.java

@ -35,7 +35,6 @@ import org.apache.dolphinscheduler.dao.mapper.UserMapper;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Locale;
import java.util.Map; import java.util.Map;
import org.junit.Assert; import org.junit.Assert;
@ -191,14 +190,7 @@ public class TenantServiceTest {
Assert.assertEquals(Status.SUCCESS.getMsg(), result.getMsg()); Assert.assertEquals(Status.SUCCESS.getMsg(), result.getMsg());
// tenantCode exist // tenantCode exist
result = tenantService.verifyTenantCode(getTenant().getTenantCode()); result = tenantService.verifyTenantCode(getTenant().getTenantCode());
String resultString; Assert.assertEquals(Status.OS_TENANT_CODE_EXIST.getCode(), result.getCode().intValue());
if (Locale.SIMPLIFIED_CHINESE.getLanguage().equals(LocaleContextHolder.getLocale().getLanguage())) {
resultString = "操作系统租户[TenantServiceTest]已存在";
} else {
resultString = "tenant code TenantServiceTest already exists";
}
logger.info(result.toString());
Assert.assertEquals(resultString, result.getMsg());
} }
/** /**

Loading…
Cancel
Save