]> source.dussan.org Git - vaadin-framework.git/commitdiff
update the failed build checking (#12439)
authorZhe Sun <31067185+ZheSun88@users.noreply.github.com>
Fri, 15 Oct 2021 10:10:25 +0000 (13:10 +0300)
committerGitHub <noreply@github.com>
Fri, 15 Oct 2021 10:10:25 +0000 (13:10 +0300)
scripts/GenerateBuildTestAndStagingReport.py

index a108a36f7231b41cc713a06412026d2e277d3018..06e22ca5b94bb71c54c5ef7db02c7f0300efcb9d 100644 (file)
@@ -47,7 +47,9 @@ def getTestStatusHtml():
         return createTableRow(traffic_light.format(color="black"), "Test status: unable to retrieve status of tests")
     else:
         test_failures_json = test_failures_request.json()
-        if test_failures_json["count"] == 0:
+        # nowadays the responds doesn't contain count keyword when the build is successful
+        # while count word can be found when build fails
+        if "count" not in test_failures_json:
             return createTableRow(traffic_light.format(color="green"), "Test status: all tests passing")
         else:
             return createTableRow(traffic_light.format(color="red"), "Test status: there are " + str(test_failures_json["count"]) + " failing tests, <a href={}>check the build report</a>".format(buildResultUrl))