Add a validation to prevent a submission of an enrollment request with duplicate appName and deviceName.
If an enrollment with duplicate appName and deviceName is submitted then throw an exception.
- How I did it
Use getAtKeys with "enrollment" regex to fetch the list of keys related to enrollment.
Iterate the List of enrollment keys and check if an enrollment with the same appName and deviceName exists. If yes, return exception.
Add a random id to the deviceName for the existing functional tests to ensure appName and deviceName combination is unique for each enrollment request.
- How to verify it
Added unit and functional tests to assert the changes. All tests should pass.
…the enrollment request
- What I did
- How I did it
- How to verify it