@@ -439,4 +439,33 @@ public void test93ElasticsearchNodeCustomDataPathAndNotEsHomeWorkDir() throws Ex
439
439
assertThat (result .stdout , containsString ("Master node was successfully bootstrapped" ));
440
440
}
441
441
442
+ public void test94ElasticsearchNodeExecuteCliNotEsHomeWorkDir () throws Exception {
443
+ assumeThat (installation , is (notNullValue ()));
444
+
445
+ final Installation .Executables bin = installation .executables ();
446
+ final Shell sh = newShell ();
447
+ // Run the cli tools from the tmp dir
448
+ sh .setWorkingDirectory (getTempDir ());
449
+
450
+ Platforms .PlatformAction action = () -> {
451
+ Result result = sh .run (bin .elasticsearchCertutil + " -h" );
452
+ assertThat (result .stdout ,
453
+ containsString ("Simplifies certificate creation for use with the Elastic Stack" ));
454
+ result = sh .run (bin .elasticsearchSyskeygen + " -h" );
455
+ assertThat (result .stdout ,
456
+ containsString ("system key tool" ));
457
+ result = sh .run (bin .elasticsearchSetupPasswords + " -h" );
458
+ assertThat (result .stdout ,
459
+ containsString ("Sets the passwords for reserved users" ));
460
+ result = sh .run (bin .elasticsearchUsers + " -h" );
461
+ assertThat (result .stdout ,
462
+ containsString ("Manages elasticsearch file users" ));
463
+ };
464
+
465
+ if (distribution ().equals (Distribution .DEFAULT_LINUX ) || distribution ().equals (Distribution .DEFAULT_WINDOWS )) {
466
+ Platforms .onLinux (action );
467
+ Platforms .onWindows (action );
468
+ }
469
+ }
470
+
442
471
}
0 commit comments