Skip to content

Commit 64d0e8a

Browse files
adnapibarpeternied
authored andcommitted
Remove packaging tests for the x-pack command line tools. (#56)
Signed-off-by: Peter Nied <petern@amazon.com>
1 parent 7381e68 commit 64d0e8a

9 files changed

Lines changed: 0 additions & 456 deletions

File tree

qa/os/src/test/java/org/elasticsearch/packaging/test/ArchiveTests.java

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -334,27 +334,6 @@ public void test80RelativePathConf() throws Exception {
334334
});
335335
}
336336

337-
public void test90SecurityCliPackaging() throws Exception {
338-
final Installation.Executables bin = installation.executables();
339-
340-
if (distribution().isDefault()) {
341-
assertThat(installation.lib.resolve("tools").resolve("security-cli"), fileExists());
342-
final Platforms.PlatformAction action = () -> {
343-
Result result = sh.run(bin.certutilTool + " --help");
344-
assertThat(result.stdout, containsString("Simplifies certificate creation for use with the Elastic Stack"));
345-
346-
// Ensure that the exit code from the java command is passed back up through the shell script
347-
result = sh.runIgnoreExitCode(bin.certutilTool + " invalid-command");
348-
assertThat(result.exitCode, is(not(0)));
349-
assertThat(result.stderr, containsString("Unknown command [invalid-command]"));
350-
};
351-
Platforms.onLinux(action);
352-
Platforms.onWindows(action);
353-
} else {
354-
assertThat(installation.lib.resolve("tools").resolve("security-cli"), fileDoesNotExist());
355-
}
356-
}
357-
358337
public void test91ElasticsearchShardCliPackaging() throws Exception {
359338
final Installation.Executables bin = installation.executables();
360339

@@ -397,28 +376,4 @@ public void test93ElasticsearchNodeCustomDataPathAndNotEsHomeWorkDir() throws Ex
397376
Result result = sh.run("echo y | " + installation.executables().nodeTool + " unsafe-bootstrap");
398377
assertThat(result.stdout, containsString("Master node was successfully bootstrapped"));
399378
}
400-
401-
public void test94ElasticsearchNodeExecuteCliNotEsHomeWorkDir() throws Exception {
402-
final Installation.Executables bin = installation.executables();
403-
// Run the cli tools from the tmp dir
404-
sh.setWorkingDirectory(getRootTempDir());
405-
406-
Platforms.PlatformAction action = () -> {
407-
Result result = sh.run(bin.certutilTool + " -h");
408-
assertThat(result.stdout, containsString("Simplifies certificate creation for use with the Elastic Stack"));
409-
result = sh.run(bin.syskeygenTool + " -h");
410-
assertThat(result.stdout, containsString("system key tool"));
411-
result = sh.run(bin.setupPasswordsTool + " -h");
412-
assertThat(result.stdout, containsString("Sets the passwords for reserved users"));
413-
result = sh.run(bin.usersTool + " -h");
414-
assertThat(result.stdout, containsString("Manages elasticsearch file users"));
415-
};
416-
417-
// TODO: this should be checked on all distributions
418-
if (distribution().isDefault()) {
419-
Platforms.onLinux(action);
420-
Platforms.onWindows(action);
421-
}
422-
}
423-
424379
}

qa/os/src/test/java/org/elasticsearch/packaging/test/CertGenCliTests.java

Lines changed: 0 additions & 114 deletions
This file was deleted.

qa/os/src/test/java/org/elasticsearch/packaging/test/CronEvalCliTests.java

Lines changed: 0 additions & 51 deletions
This file was deleted.

qa/os/src/test/java/org/elasticsearch/packaging/test/DockerTests.java

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -449,30 +449,6 @@ public void test085EnvironmentVariablesAreRespectedUnderDockerExec() {
449449
assertThat(result.stdout, containsString("java.net.UnknownHostException: this.is.not.valid: Name or service not known"));
450450
}
451451

452-
/**
453-
* Check whether the elasticsearch-certutil tool has been shipped correctly,
454-
* and if present then it can execute.
455-
*/
456-
public void test090SecurityCliPackaging() {
457-
final Installation.Executables bin = installation.executables();
458-
459-
final Path securityCli = installation.lib.resolve("tools").resolve("security-cli");
460-
461-
if (distribution().isDefault()) {
462-
assertTrue(existsInContainer(securityCli));
463-
464-
Result result = sh.run(bin.certutilTool + " --help");
465-
assertThat(result.stdout, containsString("Simplifies certificate creation for use with the Elastic Stack"));
466-
467-
// Ensure that the exit code from the java command is passed back up through the shell script
468-
result = sh.runIgnoreExitCode(bin.certutilTool + " invalid-command");
469-
assertThat(result.isSuccess(), is(false));
470-
assertThat(result.stdout, containsString("Unknown command [invalid-command]"));
471-
} else {
472-
assertFalse(existsInContainer(securityCli));
473-
}
474-
}
475-
476452
/**
477453
* Check that the elasticsearch-shard tool is shipped in the Docker image and is executable.
478454
*/

0 commit comments

Comments
 (0)