Skip to content

Commit f3c9a45

Browse files
committed
Verify compose_containers in context attribute
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 <[email protected]>
1 parent af5f75d commit f3c9a45

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bddtests/environment.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def getDockerComposeFileArgsFromYamlFile(compose_yaml):
1919

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

0 commit comments

Comments
 (0)