Description
I get errors when running ESSingleNodeTestCase
tests via IntelliJ while developing an external plugin. Tracked this down to the forced insertion of elasticsearch-secure-sm
.
The problem is that when we are using an external plugin it is already on the classpath with version and jar in the filename, ie. elasticsearch-secure-sm-6.3.2.jar
so when we do the alias and previous value check in Security we get the duplicate and thus an IllegalStateException
. We completely miss the duplication check that already exists when force adding elasticsearch-secure-sm
due to this.
Not sure what the best way to fix this is:
-
Do we check if the previous value is not null AND not equal to the value we want to set here.
-
Maybe make getCodebaseJarMap calculate the alias and use it as the map key?
-
Something else?
I can work on the PR once I know how you would like me to proceed.