Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: improve error message when missing tags[browser] #448

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

stdll00
Copy link

@stdll00 stdll00 commented Dec 8, 2022

Handle error when invalid tags provided in py_web_test_suite and go_web_test_suite.
If tags[browser_name] is missing, below erorr will be raised.

        File ".../.cache/bazel/53d5c478a9b654e0091a6804f2465ac0/external/io_bazel_rules_webtesting/web/web.bzl", line 114, column 22, in _get_kwargs
                if not out_kwargs["tags"]:
Error: key "tags" not found in dictionary

After apply this PR, error message improved.

Error in fail: expeted "default" or "chromium-local" dict key in tags argument.

Example patch to reproduce error. (You can git apply to apply)
After apply this patch, run bazel build //testing/web:webtest_test_chromium-local to reproduce error.

diff --git a/testing/web/BUILD.bazel b/testing/web/BUILD.bazel
index 8d53025..2bea226 100644
--- a/testing/web/BUILD.bazel
+++ b/testing/web/BUILD.bazel
@@ -39,9 +39,6 @@ py_web_test_suite(
         "//browsers/sauce:chrome-win10-connect",
     ],
     tags = {
-        "chromium-local": [
-            "native",
-        ],
         "chrome-win10": [
             "exclusive",
             "sauce",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant