This repository has been archived by the owner on Feb 2, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
Bug 692501: update verify against cdntest for beta #208
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -178,3 +178,64 @@ def test_multichannel(self): | |
|
||
multichan_task = get_task_by_name(self.graph, "release-beta_firefox_win32_update_verify_{chan}_3".format(chan=chan)) | ||
verify(multichan_task, multichan_schema, TestBB_UpdateVerifyMultiChannel.not_allowed) | ||
|
||
|
||
class TestBB_UpdateVerifyChannel(unittest.TestCase): | ||
maxDiff = 30000 | ||
graph = None | ||
task = None | ||
payload = None | ||
|
||
def setUp(self): | ||
self.task_schema = Schema({ | ||
'task': { | ||
'provisionerId': 'buildbot-bridge', | ||
'workerType': 'buildbot-bridge', | ||
'payload': { | ||
'properties': { | ||
'CHANNEL': 'beta-cdntest' | ||
} | ||
} | ||
} | ||
}, extra=True, required=True) | ||
test_args = create_firefox_test_args({ | ||
'updates_enabled': True, | ||
'push_to_candidates_enabled': True, | ||
'push_to_releases_enabled': True, | ||
'update_verify_enabled': True, | ||
'updates_builder_enabled': True, | ||
'signing_pvt_key': PVT_KEY_FILE, | ||
'branch': 'beta', | ||
'release_channels': ['beta'], | ||
'final_verify_channels': ['beta'], | ||
'l10n_config': L10N_CONFIG, | ||
'en_US_config': EN_US_CONFIG, | ||
'uptake_monitoring_enabled': True, | ||
'update_verify_channel': 'beta-cdntest', | ||
'update_verify_requires_cdn_push': True, | ||
}) | ||
self.graph = make_task_graph(**test_args) | ||
self.task = get_task_by_name(self.graph, "release-beta_firefox_win32_update_verify_beta_3") | ||
|
||
def test_common_assertions(self): | ||
do_common_assertions(self.graph) | ||
|
||
@staticmethod | ||
@truth | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fancy |
||
def not_allowed(task): | ||
return "scopes" not in task | ||
|
||
def test_channel(self): | ||
verify(self.task, self.task_schema, self.__class__.not_allowed) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. more fancy. ++connor |
||
|
||
def generate_task_dependency_validator(self): | ||
|
||
@truth | ||
def validate_dependencies(task): | ||
uptake = get_task_by_name(self.graph, "release-beta-firefox_uptake_monitoring")["taskId"] | ||
return uptake in task['requires'] | ||
|
||
return validate_dependencies | ||
|
||
def test_cdns(self): | ||
verify(self.task, self.task_schema, self.generate_task_dependency_validator()) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since uptake_monitoring itself assumes the other tasks in this
requires
block is done, should we have a if/else here? as in, if requires_cdn_push: add_uptake_monitor, else: add artifact_gen_and_updates tasks.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried it and not sure if it looks easier to read... https://gist.github.com/rail/9c135ff75524df54e35901e23e48d5d9
Also the tests would become more complicated... Let's go with the current version!