Rebuild test for *help* command

Test all *help* call cases, even wrong.

Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
This commit is contained in:
Slawomir Jankowski
2020-04-07 13:13:48 +02:00
parent 24a8619f9a
commit 4b26b05b9f
2 changed files with 100 additions and 22 deletions

View File

@@ -1,22 +0,0 @@
#
# Copyright(c) 2019-2020 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause-Clear
#
import logging
import pytest
from api.cas import casadm
LOGGER = logging.getLogger(__name__)
@pytest.mark.parametrize("shortcut", [True, False])
def test_cli_help(shortcut):
LOGGER.info("Test run")
output = casadm.help(shortcut)
LOGGER.info(output.stdout) # TODO:this is tmp, every ssh command shall be logged via executor
assert output.stdout[0:33] == "Cache Acceleration Software Linux"
# TODO: create yml config for every help command and match the output with it
# TODO: for now the assert above is purely for testing flow in the casadm api