WebKit Bugzilla
Attachment 340201 Details for
Bug 184914
: Export changes to web-platform-test as part of the webkit-patch upload workflow
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-184914-20180511134742.patch (text/plain), 23.09 KB, created by
Brendan McLoughlin
on 2018-05-11 10:47:43 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Brendan McLoughlin
Created:
2018-05-11 10:47:43 PDT
Size:
23.09 KB
patch
obsolete
>Subversion Revision: 231700 >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 9b08264020a7bbdacdb9dcfbecbb9ec76a7710d1..f393e35b326610ca59bdd397997795c697fb1727 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,44 @@ >+2018-05-11 Brendan McLoughlin <brendan@bocoup.com> >+ >+ Export changes to web-platform-test as part of the webkit-patch upload workflow >+ https://bugs.webkit.org/show_bug.cgi?id=184914 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Scripts/webkitpy/tool/commands/upload.py: >+ (Upload): >+ (CreateBug.execute): >+ (WPTChangeExport): >+ * Scripts/webkitpy/tool/steps/__init__.py: >+ * Scripts/webkitpy/tool/steps/wptchangeexport.py: Added. >+ (WPTChangeExport): >+ (WPTChangeExport.options): >+ (WPTChangeExport.run): >+ * Scripts/webkitpy/w3c/common.py: >+ * Scripts/webkitpy/w3c/test_exporter.py: >+ (WebPlatformTestPatchGenerator): >+ (WebPlatformTestPatchGenerator.__init__): >+ (WebPlatformTestPatchGenerator.has_wpt_changes): >+ (WebPlatformTestPatchGenerator._create_patch): >+ (WebPlatformTestPatchGenerator.create_git_patch_file): >+ (TestExporter): >+ (TestExporter.__init__): >+ (TestExporter._prompt_for_token): >+ (TestExporter._prompt_for_username): >+ (TestExporter._ensure_username_and_token): >+ (TestExporter._validate_and_save_token): >+ (TestExporter.create_git_patch): >+ (TestExporter._confirm_export): >+ (TestExporter.do_export): >+ (parse_args): >+ * Scripts/webkitpy/w3c/test_exporter_unittest.py: >+ (TestExporterTest.test_export): >+ (TestExporterTest.test_export_with_specific_branch): >+ (TestExporterTest): >+ (TestExporterTest.test_export_interactive_mode): >+ (TestExporterTest.test_export_invalid_token): >+ (TestExporterTest.test_export_wrong_token): >+ > 2018-05-10 Carlos Garcia Campos <cgarcia@igalia.com> > > [JSC][GLIB] Add introspectable alternatives to functions using vargars >diff --git a/Tools/Scripts/webkitpy/tool/commands/upload.py b/Tools/Scripts/webkitpy/tool/commands/upload.py >index 933db2d08520d860c5283f7af496fa1b94215303..f28b942bf29cab837643c2c920cb29b9badfab6e 100644 >--- a/Tools/Scripts/webkitpy/tool/commands/upload.py >+++ b/Tools/Scripts/webkitpy/tool/commands/upload.py >@@ -286,6 +286,7 @@ class Upload(AbstractPatchUploadingCommand): > steps.EnsureBugIsOpenAndAssigned, > steps.PostDiff, > steps.SubmitToEWS, >+ steps.WPTChangeExport, > ] > long_help = """upload uploads the current diff to bugs.webkit.org. > If no bug id is provided, upload will create a bug. >@@ -531,3 +532,25 @@ class CreateBug(Command): > self.create_bug_from_commit(options, args, tool) > else: > self.create_bug_from_patch(options, args, tool) >+ >+ >+class WPTChangeExport(AbstractPatchUploadingCommand): >+ name = "wpt-change-export" >+ help_text = "Opens a pull request to sync any changes in the LayoutTests/imported/w3c/web-platform-tests directory" >+ argument_names = "[BUGID]" >+ steps = [ >+ steps.WPTChangeExport, >+ ] >+ >+ long_help = """Opens a pull request to the w3c/web-platform-tests >+ github repo for any changes in the >+ LayoutTests/imported/w3c/web-platform-tests directory. This step >+ will noop if there are no changes in the web-platform-tests directory. >+ The user will be prompted to provide a github username and OAuth token >+ the first time this is run. >+ """ >+ >+ def _prepare_state(self, options, args, tool): >+ state = {} >+ state["bug_id"] = self._bug_id(options, args, tool, state) >+ return state >diff --git a/Tools/Scripts/webkitpy/tool/steps/__init__.py b/Tools/Scripts/webkitpy/tool/steps/__init__.py >index f3c170e312edd7864f9d85ad9c7759f2bc91c93f..dc0784f6151e8aff8794a69076d7e7fc2c8fca91 100644 >--- a/Tools/Scripts/webkitpy/tool/steps/__init__.py >+++ b/Tools/Scripts/webkitpy/tool/steps/__init__.py >@@ -66,3 +66,4 @@ from webkitpy.tool.steps.update import Update > from webkitpy.tool.steps.updatechangelogswithreviewer import UpdateChangeLogsWithReviewer > from webkitpy.tool.steps.validatechangelogs import ValidateChangeLogs > from webkitpy.tool.steps.validatereviewer import ValidateReviewer >+from webkitpy.tool.steps.wptchangeexport import WPTChangeExport >diff --git a/Tools/Scripts/webkitpy/tool/steps/wptchangeexport.py b/Tools/Scripts/webkitpy/tool/steps/wptchangeexport.py >new file mode 100644 >index 0000000000000000000000000000000000000000..47658c4e84d97d986273f70a9e4071babf558481 >--- /dev/null >+++ b/Tools/Scripts/webkitpy/tool/steps/wptchangeexport.py >@@ -0,0 +1,57 @@ >+# Copyright (C) 2018 Apple Inc. All rights reserved. >+# >+# Redistribution and use in source and binary forms, with or without >+# modification, are permitted provided that the following conditions are >+# met: >+# >+# * Redistributions of source code must retain the above copyright >+# notice, this list of conditions and the following disclaimer. >+# * Redistributions in binary form must reproduce the above >+# copyright notice, this list of conditions and the following disclaimer >+# in the documentation and/or other materials provided with the >+# distribution. >+# * Neither the name of Google Inc. nor the names of its >+# contributors may be used to endorse or promote products derived from >+# this software without specific prior written permission. >+# >+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS >+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT >+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR >+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT >+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, >+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT >+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, >+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY >+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ >+from webkitpy.common.system.executive import ScriptError >+from webkitpy.tool.steps.abstractstep import AbstractStep >+from webkitpy.tool.steps.options import Options >+from webkitpy.w3c.test_exporter import export_wpt_test_changes >+ >+ >+class WPTChangeExport(AbstractStep): >+ @classmethod >+ def options(cls): >+ return AbstractStep.options() + [ >+ Options.non_interactive, >+ Options.git_commit, >+ ] >+ >+ def run(self, state): >+ if self._options.non_interactive: >+ return >+ >+ bug_id = state.get("bug_id") >+ if not bug_id: >+ return >+ >+ args = ["--bug", str(bug_id), "--interactive", "--create-pr"] >+ >+ if self._options.git_commit: >+ args.append("--git-commit") >+ args.append(self._options.git_commit) >+ >+ export_wpt_test_changes(args, silent_noop=True, host=self._tool) >diff --git a/Tools/Scripts/webkitpy/w3c/common.py b/Tools/Scripts/webkitpy/w3c/common.py >index a14aa95354b906739410176c1b0378c7d7235332..66fa34f2a7e9af17376b643cb4c1a64a9888b20f 100644 >--- a/Tools/Scripts/webkitpy/w3c/common.py >+++ b/Tools/Scripts/webkitpy/w3c/common.py >@@ -30,10 +30,11 @@ > > import json > import logging >+import os > > >-WPT_GH_ORG = 'w3c' >-WPT_GH_REPO_NAME = 'web-platform-tests' >+WPT_GH_ORG = os.environ.get('WPT_GH_ORG', 'w3c') >+WPT_GH_REPO_NAME = os.environ.get('WPT_GH_REPO_NAME', 'web-platform-tests') > WPT_GH_URL = 'https://github.com/%s/%s/' % (WPT_GH_ORG, WPT_GH_REPO_NAME) > WPT_MIRROR_URL = 'https://chromium.googlesource.com/external/w3c/web-platform-tests.git' > WPT_GH_SSH_URL_TEMPLATE = 'https://{}@github.com/%s/%s.git' % (WPT_GH_ORG, WPT_GH_REPO_NAME) >diff --git a/Tools/Scripts/webkitpy/w3c/test_exporter.py b/Tools/Scripts/webkitpy/w3c/test_exporter.py >index 6a9ca5bb72c1f8483064803832b2eb755119ca6c..f677afae8e9773f4efb52513b2a57065d0110dab 100644 >--- a/Tools/Scripts/webkitpy/w3c/test_exporter.py >+++ b/Tools/Scripts/webkitpy/w3c/test_exporter.py >@@ -28,6 +28,8 @@ import argparse > import logging > import os > import time >+import json >+from urllib2 import HTTPError > > from webkitpy.common.checkout.scm.git import Git > from webkitpy.common.host import Host >@@ -35,20 +37,51 @@ from webkitpy.common.net.bugzilla import Bugzilla > from webkitpy.common.webkit_finder import WebKitFinder > from webkitpy.w3c.wpt_github import WPTGitHub > from webkitpy.w3c.wpt_linter import WPTLinter >+from webkitpy.w3c.common import WPT_GH_ORG > > _log = logging.getLogger(__name__) > > WEBKIT_WPT_DIR = 'LayoutTests/imported/w3c/web-platform-tests' >-WPT_PR_URL = "https://github.com/w3c/web-platform-tests/pull/" >+WPT_PR_URL = "https://github.com/%s/web-platform-tests/pull/" % (WPT_GH_ORG,) > WEBKIT_EXPORT_PR_LABEL = 'webkit-export' > > >-class TestExporter(object): >+class WebPlatformTestPatchGenerator(object): >+ >+ def __init__(self, host, options): >+ self._host = host >+ self._filesystem = host.filesystem >+ self._options = options >+ >+ self._host.initialize_scm() >+ >+ def has_wpt_changes(self): >+ return bool(self._create_patch()) >+ >+ def _create_patch(self): >+ patch_data = self._host.scm().create_patch(self._options.git_commit, [WEBKIT_WPT_DIR]) >+ if not patch_data or not 'diff' in patch_data: >+ return '' >+ return patch_data >+ >+ def create_git_patch_file(self): >+ _, patch_file = self._filesystem.open_binary_tempfile('wpt_export_patch') >+ patch_data = self._create_patch() >+ if not 'diff' in patch_data: >+ _log.info('No changes to upstream, patch data is: "%s"' % (patch_data)) >+ return '' >+ # FIXME: We can probably try to use --relative git parameter to not do that replacement. >+ patch_data = patch_data.replace(WEBKIT_WPT_DIR + '/', '') >+ self._filesystem.write_text_file(patch_file, patch_data) >+ return patch_file > >- def __init__(self, host, options, gitClass=Git, bugzillaClass=Bugzilla, WPTGitHubClass=WPTGitHub, WPTLinterClass=WPTLinter): >+ >+class TestExporter(object): >+ def __init__(self, host, options, wpt_patch_generator, gitClass=Git, bugzillaClass=Bugzilla, WPTGitHubClass=WPTGitHub, WPTLinterClass=WPTLinter): > self._host = host > self._filesystem = host.filesystem > self._options = options >+ self._wpt_patch_generator = wpt_patch_generator > > self._host.initialize_scm() > >@@ -67,25 +100,7 @@ class TestExporter(object): > self._git = self._ensure_wpt_repository("https://github.com/w3c/web-platform-tests.git", self._options.repository_directory, gitClass) > self._linter = WPTLinterClass(self._options.repository_directory, host.filesystem) > >- self._username = options.username >- if not self._username: >- self._username = self._git.local_config('github.username').rstrip() >- if not self._username: >- self._username = os.environ.get('GITHUB_USERNAME') >- if not self._username: >- raise ValueError("Missing GitHub username, please provide it as a command argument (see help for the command).") >- elif not self._git.local_config('github.username'): >- self._git.set_local_config('github.username', self._username) >- >- self._token = options.token >- if not self._token: >- self._token = self._git.local_config('github.token').rstrip() >- if not self._token: >- self._token = os.environ.get('GITHUB_TOKEN') >- if not self._token: >- _log.info("Missing GitHub token, the script will not be able to create a pull request to W3C web-platform-tests repository.") >- elif not self._git.local_config('github.token'): >- self._git.set_local_config('github.token', self._token) >+ self._ensure_username_and_token(options) > > self._github = WPTGitHubClass(self._host, self._username, self._token) if self._username and self._token else None > >@@ -104,6 +119,60 @@ class TestExporter(object): > if not self._wpt_fork_push_url: > self._wpt_fork_push_url = "https://" + self._username + "@github.com/" + self._username + "/web-platform-tests.git" > >+ def _prompt_for_token(self): >+ return self._host.user.prompt_password('Enter github OAuth token: ') >+ >+ def _prompt_for_username(self): >+ return self._host.user.prompt('Enter github username: ') >+ >+ def _ensure_username_and_token(self, options): >+ """ >+ Ask the user to provide a username and token if the >+ --interactive flag is passed and username and token >+ are not already set. >+ """ >+ self._username = options.username >+ if not self._username: >+ self._username = self._git.local_config('github.username').rstrip() >+ if not self._username: >+ self._username = os.environ.get('GITHUB_USERNAME') >+ if not self._username and options.interactive_mode: >+ self._username = self._prompt_for_username() >+ if not self._username: >+ raise ValueError("Missing GitHub username, please provide it as a command argument (see help for the command).") >+ >+ self._token = options.token >+ if not self._token: >+ self._token = self._git.local_config('github.token').rstrip() >+ if not self._token: >+ self._token = os.environ.get('GITHUB_TOKEN') >+ if not self._token and options.interactive_mode: >+ self._token = self._prompt_for_token() >+ if not self._token: >+ _log.info("Missing GitHub token, the script will not be able to create a pull request to W3C web-platform-tests repository.") >+ >+ if self._token: >+ self._validate_and_save_token(self._username, self._token) >+ >+ def _validate_and_save_token(self, username, token): >+ # validate token and username >+ url = 'https://api.github.com/user?access_token=%s' % (token,) >+ try: >+ response = self._host.web.request(method='GET', url=url, data=None) >+ except HTTPError as e: >+ raise Exception("OAuth token is not valid") >+ data = json.load(response) >+ login = data.get('login', None) >+ if login != username: >+ raise Exception("OAuth token does not match the provided username. Provided user: %s, github login: %s" % (username, login)) >+ else: >+ # Username and token are valid. Save them in the git config so we >+ # do not need to ask for them again >+ if not self._git.local_config('github.token'): >+ self._git.set_local_config('github.token', token) >+ if not self._git.local_config('github.username'): >+ self._git.set_local_config('github.username', username) >+ > def _ensure_wpt_repository(self, url, wpt_repository_directory, gitClass): > git = None > if not self._filesystem.exists(wpt_repository_directory): >@@ -208,22 +277,19 @@ class TestExporter(object): > self._git.delete_branch(self._branch_name) > > def create_git_patch(self): >- patch_file = './patch.temp.' + str(time.clock()) >- git_commit = "HEAD...." if not self._options.git_commit else self._options.git_commit + "~1.." + self._options.git_commit >- patch_data = self._host.scm().create_patch(git_commit, [WEBKIT_WPT_DIR]) >- if not patch_data or not 'diff' in patch_data: >- _log.info('No changes to upstream, patch data is: "%s"' % (patch_data)) >- return '' >- # FIXME: We can probably try to use --relative git parameter to not do that replacement. >- patch_data = patch_data.replace(WEBKIT_WPT_DIR + '/', '') >- patch_file = self._filesystem.abspath(patch_file) >- self._filesystem.write_text_file(patch_file, patch_data) >- return patch_file >+ return self._wpt_patch_generator.create_git_patch_file() > > def create_upload_remote_if_needed(self): > if not self._wpt_fork_remote in self._git.remote([]): > self._git.remote(["add", self._wpt_fork_remote, self._wpt_fork_push_url]) > >+ def _confirm_export(self): >+ message = "web-platform-tests changes detected. Would you like to create a pull-request to the WPT github repo now?" >+ if self._options.interactive_mode: >+ return self._host.user.confirm(message) >+ else: >+ return True >+ > def do_export(self): > git_patch_file = self.create_git_patch() > >@@ -231,6 +297,9 @@ class TestExporter(object): > _log.error("Unable to create a patch to apply to web-platform-tests repository") > return > >+ if not self._confirm_export(): >+ return >+ > self._fetch_wpt_repository() > self.clean() > >@@ -290,6 +359,7 @@ def parse_args(args): > parser.add_argument('-u', '--remote-url', dest='repository_remote_url', default=None, help='repository url to use to push') > parser.add_argument('-d', '--repository', dest='repository_directory', default=None, help='repository directory') > parser.add_argument('-c', '--create-pr', dest='create_pull_request', action='store_true', default=False, help='create pull request to w3c web-platform-tests') >+ parser.add_argument('-i', '--interactive', dest='interactive_mode', action='store_true', default=False, help='Prompts the user for their github credentials and asks for confirmation before exporting the changes.') > > options, args = parser.parse_known_args(args) > >@@ -305,6 +375,7 @@ def configure_logging(): > return record.getMessage() > > logger = logging.getLogger('webkitpy.w3c.test_exporter') >+ logger.propagate = False > logger.setLevel(logging.INFO) > handler = LogHandler() > handler.setLevel(logging.INFO) >@@ -313,10 +384,19 @@ def configure_logging(): > > > def main(_argv, _stdout, _stderr): >- options = parse_args(_argv) >+ export_wpt_test_changes(_argv, silent_noop=False) >+ >+ >+def export_wpt_test_changes(args, silent_noop=False, host=None): >+ options = parse_args(args) > > configure_logging() > >- test_exporter = TestExporter(Host(), options) >+ host = host or Host() >+ wpt_patch_generator = WebPlatformTestPatchGenerator(host, options) > >- test_exporter.do_export() >+ if wpt_patch_generator.has_wpt_changes(): >+ test_exporter = TestExporter(host, options, wpt_patch_generator) >+ test_exporter.do_export() >+ elif not silent_noop: >+ _log.info('No changes to upstream. Exiting...') >diff --git a/Tools/Scripts/webkitpy/w3c/test_exporter_unittest.py b/Tools/Scripts/webkitpy/w3c/test_exporter_unittest.py >index b8334a949c6128672e3c4724f16103c04f9cb989..f4bd62be678a15b644cbfb0f7d40734fd974c1d1 100644 >--- a/Tools/Scripts/webkitpy/w3c/test_exporter_unittest.py >+++ b/Tools/Scripts/webkitpy/w3c/test_exporter_unittest.py >@@ -25,7 +25,7 @@ import unittest > from webkitpy.common.host_mock import MockHost > from webkitpy.common.system.filesystem_mock import MockFileSystem > from webkitpy.common.system.executive_mock import MockExecutive2 >-from webkitpy.w3c.test_exporter import TestExporter, parse_args >+from webkitpy.w3c.test_exporter import TestExporter, WebPlatformTestPatchGenerator, parse_args > from webkitpy.w3c.wpt_github_mock import MockWPTGitHub > > mock_linter = None >@@ -122,8 +122,10 @@ class TestExporterTest(unittest.TestCase): > > def test_export(self): > host = TestExporterTest.MyMockHost() >+ host.web.responses.append({'status_code': 200, 'body': '{"login": "USER"}'}) > options = parse_args(['test_exporter.py', '-g', 'HEAD', '-b', '1234', '-c', '-n', 'USER', '-t', 'TOKEN']) >- exporter = TestExporter(host, options, TestExporterTest.MockGit, TestExporterTest.MockBugzilla, MockWPTGitHub, TestExporterTest.MockWPTLinter) >+ w3c_patch_generator = WebPlatformTestPatchGenerator(host, options) >+ exporter = TestExporter(host, options, w3c_patch_generator, TestExporterTest.MockGit, TestExporterTest.MockBugzilla, MockWPTGitHub, TestExporterTest.MockWPTLinter) > exporter.do_export() > self.assertEquals(exporter._github.calls, ['create_pr', 'add_label "webkit-export"']) > self.assertTrue('WebKit export' in exporter._github.pull_requests_created[0][1]) >@@ -150,8 +152,10 @@ class TestExporterTest(unittest.TestCase): > > def test_export_with_specific_branch(self): > host = TestExporterTest.MyMockHost() >+ host.web.responses.append({'status_code': 200, 'body': '{"login": "USER"}'}) > options = parse_args(['test_exporter.py', '-g', 'HEAD', '-b', '1234', '-c', '-n', 'USER', '-t', 'TOKEN', '-bn', 'wpt-export-branch']) >- exporter = TestExporter(host, options, TestExporterTest.MockGit, TestExporterTest.MockBugzilla, MockWPTGitHub, TestExporterTest.MockWPTLinter) >+ w3c_patch_generator = WebPlatformTestPatchGenerator(host, options) >+ exporter = TestExporter(host, options, w3c_patch_generator, TestExporterTest.MockGit, TestExporterTest.MockBugzilla, MockWPTGitHub, TestExporterTest.MockWPTLinter) > exporter.do_export() > self.assertEquals(exporter._git.calls, [ > '/mock-checkout/WebKitBuild/w3c-tests/web-platform-tests', >@@ -169,3 +173,29 @@ class TestExporterTest(unittest.TestCase): > 'delete branch wpt-export-for-webkit-1234', > 'checkout master', > 'reset hard origin/master']) >+ >+ def test_export_interactive_mode(self): >+ host = TestExporterTest.MyMockHost() >+ host.web.responses.append({'status_code': 200, 'body': '{"login": "USER"}'}) >+ options = parse_args(['test_exporter.py', '-g', 'HEAD', '-b', '1234', '-c', '-n', 'USER', '-t', 'TOKEN', '--interactive']) >+ w3c_patch_generator = WebPlatformTestPatchGenerator(host, options) >+ exporter = TestExporter(host, options, w3c_patch_generator, TestExporterTest.MockGit, TestExporterTest.MockBugzilla, MockWPTGitHub, TestExporterTest.MockWPTLinter) >+ exporter.do_export() >+ >+ def test_export_invalid_token(self): >+ host = TestExporterTest.MyMockHost() >+ host.web.responses.append({'status_code': 401}) >+ options = parse_args(['test_exporter.py', '-g', 'HEAD', '-b', '1234', '-c', '-n', 'USER', '-t', 'TOKEN']) >+ w3c_patch_generator = WebPlatformTestPatchGenerator(host, options) >+ with self.assertRaises(Exception) as context: >+ exporter = TestExporter(host, options, w3c_patch_generator, TestExporterTest.MockGit, TestExporterTest.MockBugzilla, MockWPTGitHub, TestExporterTest.MockWPTLinter) >+ self.assertIn('OAuth token is not valid', str(context.exception)) >+ >+ def test_export_wrong_token(self): >+ host = TestExporterTest.MyMockHost() >+ host.web.responses.append({'status_code': 200, 'body': '{"login": "DIFF_USER"}'}) >+ options = parse_args(['test_exporter.py', '-g', 'HEAD', '-b', '1234', '-c', '-n', 'USER', '-t', 'TOKEN']) >+ w3c_patch_generator = WebPlatformTestPatchGenerator(host, options) >+ with self.assertRaises(Exception) as context: >+ exporter = TestExporter(host, options, w3c_patch_generator, TestExporterTest.MockGit, TestExporterTest.MockBugzilla, MockWPTGitHub, TestExporterTest.MockWPTLinter) >+ self.assertIn('OAuth token does not match the provided username', str(context.exception))
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 184914
:
338645
|
338648
|
338734
|
340201
|
340348
|
340423
|
340424
|
340579
|
341510
|
341514