Skip to content

Commit

Permalink
Verify compose_containers in context attribute
Browse files Browse the repository at this point in the history
Builds are failing with attribute error in jenkins CI as compose_containers are not
loading properly. Adding this logic to skip the test and continue with other
tests and print the logs.

Change-Id: I08d141c187ab176d034dd6032e36d7e53e938be8
Signed-off-by: rameshthoomu <rameshbabu.thoomu@gmail.com>
  • Loading branch information
rameshthoomu committed Aug 30, 2016
1 parent af5f75d commit f3c9a45
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 f3c9a45

Please sign in to comment.