Class KarafShell


  • public class KarafShell
    extends Object
    Helper class to run commands in the Karaf Shell as well as verify the log.
    Author:
    mvrueden
    • Method Detail

      • runCommand

        public KarafShell runCommand​(String command,
                                     java.util.function.Function<String,​Boolean> verifyOutputFunction)
        Runs the given command in the karaf shell. The optional function verifies the output.
        Parameters:
        command - the command to run, e.g. "features:list"
        verifyOutputFunction - An optional function to verify the output, e.g. to check for certain log messages
        Returns:
        The shell itself, to run further commands.