mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2024-11-29 12:04:04 -06:00
Merge branch 'master' of https://github.com/nosqlbench/nosqlbench
This commit is contained in:
commit
cea0baf489
@ -20,12 +20,15 @@ package io.nosqlbench.engine.core.script;
|
||||
import io.nosqlbench.cli.testing.ProcessInvoker;
|
||||
import io.nosqlbench.cli.testing.ProcessResult;
|
||||
import org.junit.Test;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class NBCliIntegrationTests {
|
||||
|
||||
private final static String JARNAME = "target/nb.jar";
|
||||
private Logger logger = LoggerFactory.getLogger(NBCliIntegrationTests.class);
|
||||
|
||||
@Test
|
||||
public void listWorkloadsTest() {
|
||||
@ -38,4 +41,29 @@ public class NBCliIntegrationTests {
|
||||
System.out.println(result.getStderrData());
|
||||
assertThat(result.exitStatus).isEqualTo(0);
|
||||
}
|
||||
@Test
|
||||
public void dockerMetrics() {
|
||||
ProcessInvoker invoker = new ProcessInvoker();
|
||||
invoker.setLogDir("logs/test");
|
||||
|
||||
// check for docker
|
||||
ProcessResult result = invoker.run("docker-detection-test", 15,
|
||||
"docker", "ps"
|
||||
);
|
||||
|
||||
System.out.println(result.getStdoutData());
|
||||
System.out.println(result.getStderrData());
|
||||
|
||||
if(result.exitStatus ==0) {
|
||||
result = invoker.run("docker-metrics-test", 15,
|
||||
"java", "-jar", JARNAME, "--logs-dir", "logs/test", "--docker-metrics"
|
||||
);
|
||||
System.out.println(result.getStdoutData());
|
||||
System.out.println(result.getStderrData());
|
||||
assertThat(result.exitStatus).isEqualTo(0);
|
||||
return;
|
||||
}
|
||||
|
||||
logger.warn("skipped docker-metrics test because docker is not available");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user