I am testing a plugin using the SDK on JIRA Server.
I have 5 users created and assigned to the admin group, that has access to my plugin.
I have applied the 2 user / 1 remote-agent license from Timebomb.
My code checks for license.getError().isDefined() with the intent to obtain the error, then depicts what type is it. Expected in this case is to have a user mismatch error.
However getError().isDefined() returns false.
When I updated the license JIRA responded with a success message.
This is not the case when I update with a "mismatch 10 user license, maintenance expired before your app was built". This time JIRA displayed a warning message and the Status after the license was installed reflects also that there is a problem.
I wonder why when I install the 2 user licence, even if I have 5 users created, JIRA does not display any error and also the license.getError().isDefined() returns false.
Also trying to test each and every type of error, using the info. from this JIRA page
https://developer.atlassian.com/platform/marketplace/timebomb-licenses-for-testing-server-apps/ I encountered problems.
Some of those cases can not be tested because JIRA rejects them with an error message.
For example, the page states:
"To test a type mismatch error, do the following:
Enter a new host product license:
10 user starter non-eval host product license, expires in 3 hours"
When attempting to install the license JIRA rejects it with the following error message
"Your add-on license is not valid for use with Insights for JIRA. Ensure that you have entered the correct add-on license."
Question is, how can all those cases be actually tested?