Fix EDQS msa test
This commit is contained in:
parent
14f24d2497
commit
40ed140952
@ -42,6 +42,7 @@ import org.thingsboard.server.common.data.alarm.Alarm;
|
|||||||
import org.thingsboard.server.common.data.asset.Asset;
|
import org.thingsboard.server.common.data.asset.Asset;
|
||||||
import org.thingsboard.server.common.data.asset.AssetProfile;
|
import org.thingsboard.server.common.data.asset.AssetProfile;
|
||||||
import org.thingsboard.server.common.data.cf.CalculatedField;
|
import org.thingsboard.server.common.data.cf.CalculatedField;
|
||||||
|
import org.thingsboard.server.common.data.edqs.EdqsState;
|
||||||
import org.thingsboard.server.common.data.event.EventType;
|
import org.thingsboard.server.common.data.event.EventType;
|
||||||
import org.thingsboard.server.common.data.id.AlarmId;
|
import org.thingsboard.server.common.data.id.AlarmId;
|
||||||
import org.thingsboard.server.common.data.id.AssetId;
|
import org.thingsboard.server.common.data.id.AssetId;
|
||||||
@ -738,13 +739,13 @@ public class TestRestClient {
|
|||||||
.as(Long.class);
|
.as(Long.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean isEdqsApiEnabled() {
|
public EdqsState getEdqsState() {
|
||||||
return given().spec(requestSpec)
|
return given().spec(requestSpec)
|
||||||
.get("/api/edqs/enabled")
|
.get("/api/edqs/state")
|
||||||
.then()
|
.then()
|
||||||
.statusCode(HTTP_OK)
|
.statusCode(HTTP_OK)
|
||||||
.extract()
|
.extract()
|
||||||
.as(Boolean.class);
|
.as(EdqsState.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void assignDeviceToCustomer(CustomerId customerId, DeviceId id) {
|
public void assignDeviceToCustomer(CustomerId customerId, DeviceId id) {
|
||||||
|
|||||||
@ -73,7 +73,7 @@ public class EdqsEntityDataQueryTest extends AbstractContainerTest {
|
|||||||
@BeforeClass
|
@BeforeClass
|
||||||
public void beforeClass() throws Exception {
|
public void beforeClass() throws Exception {
|
||||||
testRestClient.login("sysadmin@thingsboard.org", "sysadmin");
|
testRestClient.login("sysadmin@thingsboard.org", "sysadmin");
|
||||||
await().atMost(60, TimeUnit.SECONDS).until(() -> testRestClient.isEdqsApiEnabled());
|
await().atMost(60, TimeUnit.SECONDS).until(() -> testRestClient.getEdqsState().isApiEnabled());
|
||||||
|
|
||||||
tenantId = testRestClient.postTenant(EntityPrototypes.defaultTenantPrototype("Tenant")).getId();
|
tenantId = testRestClient.postTenant(EntityPrototypes.defaultTenantPrototype("Tenant")).getId();
|
||||||
tenantAdminId = testRestClient.createUserAndLogin(defaultTenantAdmin(tenantId, "tenantAdmin@thingsboard.org"), "tenant");
|
tenantAdminId = testRestClient.createUserAndLogin(defaultTenantAdmin(tenantId, "tenantAdmin@thingsboard.org"), "tenant");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user