mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Adding more testcases for non existing device Ids.
This commit is contained in:
parent
f42b760884
commit
b9b3c4ff43
@ -343,6 +343,17 @@ public class OperationManagementTests extends BaseDeviceManagementTest {
|
||||
Assert.assertTrue(operation.getType().equals(Operation.Type.POLICY));
|
||||
}
|
||||
|
||||
@Test(dependsOnMethods = "updateOperation", expectedExceptions = OperationManagementException.class)
|
||||
public void getNextPendingOperationAsNonAdmin() throws OperationManagementException {
|
||||
startTenantFlowAsNonAdmin();
|
||||
try {
|
||||
DeviceIdentifier deviceIdentifier = this.deviceIds.get(0);
|
||||
this.operationMgtService.getNextPendingOperation(deviceIdentifier);
|
||||
} finally {
|
||||
PrivilegedCarbonContext.endTenantFlow();
|
||||
}
|
||||
}
|
||||
|
||||
@Test(dependsOnMethods = "getNextPendingOperation")
|
||||
public void getOperationByDeviceAndOperationId() throws OperationManagementException {
|
||||
DeviceIdentifier deviceIdentifier = this.deviceIds.get(0);
|
||||
@ -485,4 +496,9 @@ public class OperationManagementTests extends BaseDeviceManagementTest {
|
||||
this.operationMgtService.getPendingOperations(new DeviceIdentifier(INVALID_DEVICE, DEVICE_TYPE));
|
||||
}
|
||||
|
||||
@Test(dependsOnMethods = "getPendingOperationDeviceForInvalidDevice", expectedExceptions = OperationManagementException.class)
|
||||
public void getNextPendingOperationDeviceForInvalidDevice() throws DeviceManagementException, OperationManagementException {
|
||||
this.operationMgtService.getNextPendingOperation(new DeviceIdentifier(INVALID_DEVICE, DEVICE_TYPE));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user