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 {
|
||||
logout();
|
||||
resetTokens();
|
||||
JsonNode tokenInfo = readResponse(doPost("/api/auth/login", new LoginRequest(username, password)).andExpect(status().isOk()), JsonNode.class);
|
||||
validateAndSetJwtToken(tokenInfo, username);
|
||||
}
|
||||
|
||||
@ -63,15 +63,15 @@ public abstract class BaseRestApiLimitsTest extends AbstractControllerTest {
|
||||
public void before() throws Exception {
|
||||
loginSysAdmin();
|
||||
tenantProfile = getDefaultTenantProfile();
|
||||
logout();
|
||||
resetTokens();
|
||||
}
|
||||
|
||||
@After
|
||||
public void after() throws Exception {
|
||||
logout();
|
||||
resetTokens();
|
||||
loginSysAdmin();
|
||||
saveTenantProfileWitConfiguration(tenantProfile, new DefaultTenantProfileConfiguration());
|
||||
logout();
|
||||
resetTokens();
|
||||
service.shutdown();
|
||||
}
|
||||
|
||||
@ -85,7 +85,7 @@ public abstract class BaseRestApiLimitsTest extends AbstractControllerTest {
|
||||
|
||||
saveTenantProfileWitConfiguration(tenantProfile, configurationWithCustomerRestLimits);
|
||||
|
||||
logout();
|
||||
resetTokens();
|
||||
|
||||
loginCustomerUser();
|
||||
|
||||
@ -105,7 +105,7 @@ public abstract class BaseRestApiLimitsTest extends AbstractControllerTest {
|
||||
|
||||
saveTenantProfileWitConfiguration(tenantProfile, configurationWithTenantRestLimits);
|
||||
|
||||
logout();
|
||||
resetTokens();
|
||||
|
||||
loginCustomerUser();
|
||||
|
||||
@ -125,7 +125,7 @@ public abstract class BaseRestApiLimitsTest extends AbstractControllerTest {
|
||||
|
||||
saveTenantProfileWitConfiguration(tenantProfile, configurationWithTenantRestLimits);
|
||||
|
||||
logout();
|
||||
resetTokens();
|
||||
|
||||
loginTenantAdmin();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user