Skip to content

Commit

Permalink
Merge "Verify compose_containers in context attribute"
Browse files Browse the repository at this point in the history
  • Loading branch information
binhn authored and Gerrit Code Review committed Aug 31, 2016
2 parents b9747d3 + f3c9a45 commit 0ba14a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bddtests/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def getDockerComposeFileArgsFromYamlFile(compose_yaml):

def after_scenario(context, scenario):
get_logs = context.config.userdata.get("logs", "N")
if get_logs.lower() == "force" or (scenario.status == "failed" and get_logs.lower() == "y"):
if get_logs.lower() == "force" or (scenario.status == "failed" and get_logs.lower() == "y" and "compose_containers" in context):
print("Scenario {0} failed. Getting container logs".format(scenario.name))
file_suffix = "_" + scenario.name.replace(" ", "_") + ".log"
# get logs from the peer containers
Expand Down

0 comments on commit 0ba14a5

Please sign in to comment.