Skip to content

Commit

Permalink
Printout cli result in CLI BDD tests
Browse files Browse the repository at this point in the history
Add some print to show cli result. Help to find error when tests failed.

Change-Id: Ia55850156af8d4786c64ace330bc45864c87a391
Signed-off-by: jiangyaoguo <jiangyaoguo@gmail.com>
  • Loading branch information
jiangyaoguo committed Aug 21, 2016
1 parent e477881 commit 711f439
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bddtests/steps/peer_cli_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@

@when(u'I execute "{command}" in container {containerName}')
def step_impl(context, command, containerName):
print("Run command: \"{0}\" in container {1}".format(command, containerName))
executeCommandInContainer(context, command, containerName)
print("stdout: {0}".format(context.command["stdout"]))
print("stderr: {0}".format(context.command["stderr"]))
print("returnCode: {0}".format(context.command["returnCode"]))

def executeCommandInContainer(context, command, container):
fullContainerName = fullNameFromContainerNamePart(container, context.compose_containers)
Expand Down

0 comments on commit 711f439

Please sign in to comment.