Fix broken test logic
This commit is contained in:
parent
9def5a30c6
commit
7ce3af709b
@ -375,7 +375,7 @@ public abstract class AbstractWebTest extends AbstractInMemoryStorageTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void login(String username, String password) throws Exception {
|
protected void login(String username, String password) throws Exception {
|
||||||
logout();
|
resetTokens();
|
||||||
JsonNode tokenInfo = readResponse(doPost("/api/auth/login", new LoginRequest(username, password)).andExpect(status().isOk()), JsonNode.class);
|
JsonNode tokenInfo = readResponse(doPost("/api/auth/login", new LoginRequest(username, password)).andExpect(status().isOk()), JsonNode.class);
|
||||||
validateAndSetJwtToken(tokenInfo, username);
|
validateAndSetJwtToken(tokenInfo, username);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -63,15 +63,15 @@ public abstract class BaseRestApiLimitsTest extends AbstractControllerTest {
|
|||||||
public void before() throws Exception {
|
public void before() throws Exception {
|
||||||
loginSysAdmin();
|
loginSysAdmin();
|
||||||
tenantProfile = getDefaultTenantProfile();
|
tenantProfile = getDefaultTenantProfile();
|
||||||
logout();
|
resetTokens();
|
||||||
}
|
}
|
||||||
|
|
||||||
@After
|
@After
|
||||||
public void after() throws Exception {
|
public void after() throws Exception {
|
||||||
logout();
|
resetTokens();
|
||||||
loginSysAdmin();
|
loginSysAdmin();
|
||||||
saveTenantProfileWitConfiguration(tenantProfile, new DefaultTenantProfileConfiguration());
|
saveTenantProfileWitConfiguration(tenantProfile, new DefaultTenantProfileConfiguration());
|
||||||
logout();
|
resetTokens();
|
||||||
service.shutdown();
|
service.shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,7 +85,7 @@ public abstract class BaseRestApiLimitsTest extends AbstractControllerTest {
|
|||||||
|
|
||||||
saveTenantProfileWitConfiguration(tenantProfile, configurationWithCustomerRestLimits);
|
saveTenantProfileWitConfiguration(tenantProfile, configurationWithCustomerRestLimits);
|
||||||
|
|
||||||
logout();
|
resetTokens();
|
||||||
|
|
||||||
loginCustomerUser();
|
loginCustomerUser();
|
||||||
|
|
||||||
@ -105,7 +105,7 @@ public abstract class BaseRestApiLimitsTest extends AbstractControllerTest {
|
|||||||
|
|
||||||
saveTenantProfileWitConfiguration(tenantProfile, configurationWithTenantRestLimits);
|
saveTenantProfileWitConfiguration(tenantProfile, configurationWithTenantRestLimits);
|
||||||
|
|
||||||
logout();
|
resetTokens();
|
||||||
|
|
||||||
loginCustomerUser();
|
loginCustomerUser();
|
||||||
|
|
||||||
@ -125,7 +125,7 @@ public abstract class BaseRestApiLimitsTest extends AbstractControllerTest {
|
|||||||
|
|
||||||
saveTenantProfileWitConfiguration(tenantProfile, configurationWithTenantRestLimits);
|
saveTenantProfileWitConfiguration(tenantProfile, configurationWithTenantRestLimits);
|
||||||
|
|
||||||
logout();
|
resetTokens();
|
||||||
|
|
||||||
loginTenantAdmin();
|
loginTenantAdmin();
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user