use of org.jboss.as.cli.impl.CommandContextImpl in project wildfly-core by wildfly.
the class BatchFileTestCase method testRunBatchFileBoot.
@Test
public void testRunBatchFileBoot() throws Exception {
createFile(new String[] { "/system-property=batchfiletest:add(value=true)", "", "# comments", "/system-property=batchfiletest:write-attribute(value=false)" });
final CommandContext ctx = new CommandContextImpl(null);
try {
ctx.bindClient(managementClient.getControllerClient());
doTestRunBatchFile(ctx);
} finally {
ctx.terminateSession();
}
}
use of org.jboss.as.cli.impl.CommandContextImpl in project wildfly-core by wildfly.
the class BatchWithHeadersTestCase method testSuccessfulTryBoot.
@Test
public void testSuccessfulTryBoot() throws Exception {
final CommandContext ctx = new CommandContextImpl(null);
try {
ctx.bindClient(managementClient.getControllerClient());
doTest(ctx);
} finally {
ctx.terminateSession();
}
}
use of org.jboss.as.cli.impl.CommandContextImpl in project wildfly-core by wildfly.
the class AppendTestCase method testAppendNonExistingFileBoot.
@Test
public void testAppendNonExistingFileBoot() throws Exception {
CommandContext ctx = new CommandContextImpl(null);
String fileName = "non-existing-file-boot";
Path path = Paths.get(fileName);
try {
ctx.handle("echo foo >> " + fileName);
Assert.assertTrue("The file" + fileName + "doesn't contain expected content.", checkFileContains(path, "foo"));
} finally {
ctx.terminateSession();
Files.delete(path);
}
}
use of org.jboss.as.cli.impl.CommandContextImpl in project wildfly-core by wildfly.
the class BasicOpsTestCase method testImplicitValuesBoot.
@Test
public void testImplicitValuesBoot() throws Exception {
CommandContext ctx = new CommandContextImpl(null);
ctx.bindClient(managementClient.getControllerClient());
doTestImplicitValues(ctx);
}
Aggregations