Skip to content

Commit

Permalink
Fix SetupPasswordToolIT (#77413)
Browse files Browse the repository at this point in the history
In #77291, we introduced the functionality to auto-generate a
password for the elastic user on startup. This means that the
setup-passwords tool cannot be used ( as it depends on the
password not being set ). This change fixes the QA project
test cluster to start with auto-configuration disabled
  • Loading branch information
jkakavas authored Sep 8, 2021
1 parent c2c168e commit ab30f41
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ setlocal enableextensions
set ES_MAIN_CLASS=org.elasticsearch.xpack.security.authc.esnative.tool.ResetBuiltinPasswordTool
set ES_ADDITIONAL_SOURCES=x-pack-env;x-pack-security-env
set ES_ADDITIONAL_CLASSPATH_DIRECTORIES=lib/tools/security-cli
call "%~dp0elasticsearch-cli.bat --elastic" ^
call "%~dp0elasticsearch-cli.bat" "--elastic" ^
%%* ^
|| goto exit

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ setlocal enableextensions
set ES_MAIN_CLASS=org.elasticsearch.xpack.security.authc.esnative.tool.ResetBuiltinPasswordTool
set ES_ADDITIONAL_SOURCES=x-pack-env;x-pack-security-env
set ES_ADDITIONAL_CLASSPATH_DIRECTORIES=lib/tools/security-cli
call "%~dp0elasticsearch-cli.bat --kibana_system" ^
call "%~dp0elasticsearch-cli.bat" "--kibana_system" ^
%%* ^
|| goto exit

Expand Down
2 changes: 2 additions & 0 deletions x-pack/qa/security-setup-password-tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ testClusters.matching { it.name == "integTest" }.configureEach {
testDistribution = 'DEFAULT'
setting 'xpack.security.enabled', 'true'
setting 'xpack.license.self_generated.type', 'trial'
// Setup passwords doesn't work when there is a password auto-configured on first start
setting 'xpack.security.autoconfiguration.enabled', 'false'

user username: "test_admin", password: "x-pack-test-password"
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

public class SetupPasswordToolIT extends AbstractPasswordToolTestCase {

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/77408")
public void testSetupPasswordToolAutoSetup() throws Exception {

MockTerminal mockTerminal = new MockTerminal();
Expand Down

0 comments on commit ab30f41

Please sign in to comment.