repo_roller: Reformat tests
Change-Id: I62e5281431c4bf021f60d5cde8fe86ef619add23
Reviewed-on: https://pigweed-review.googlesource.com/c/infra/recipes/+/229076
Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com>
Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
Reviewed-by: Danielle Kay <danikay@google.com>
Pigweed-Auto-Submit: Rob Mohr <mohrr@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed-service-accounts.iam.gserviceaccount.com>
diff --git a/recipes/repo_roller.py b/recipes/repo_roller.py
index d21fdbd..4bb5a2d 100644
--- a/recipes/repo_roller.py
+++ b/recipes/repo_roller.py
@@ -364,26 +364,27 @@
name, api.roll_util.commit('a' * 40, 'foo\nbar')
)
- yield (
- api.test('success')
- + properties(api, path='a1', cc_authors_on_rolls=True, always_cc=True)
- + api.checkout.ci_test_data(git_repo='https://foo.googlesource.com/a')
- + commit_data('a1')
- + read_step_data()
- + api.roll_util.forward_roll()
- + api.auto_roller.dry_run_success()
+ yield api.test(
+ 'success',
+ properties(api, path='a1', cc_authors_on_rolls=True, always_cc=True),
+ api.checkout.ci_test_data(git_repo='https://foo.googlesource.com/a'),
+ commit_data('a1'),
+ read_step_data(),
+ api.roll_util.forward_roll(),
+ api.auto_roller.dry_run_success(),
)
- yield (
- api.test('name-not-found', status='FAILURE')
- + properties(api, path='missing')
- + api.checkout.ci_test_data(git_repo='https://bar.googlesource.com/b')
- + read_step_data()
+ yield api.test(
+ 'name-not-found',
+ properties(api, path='missing'),
+ api.checkout.ci_test_data(git_repo='https://bar.googlesource.com/b'),
+ read_step_data(),
+ status='FAILURE',
)
- yield (
- api.test('equivalent')
- + properties(
+ yield api.test(
+ 'equivalent',
+ properties(
api,
path='b2',
equivalent_remotes=(
@@ -393,110 +394,113 @@
),
),
cc_reviewers_on_rolls=True,
- )
- + api.checkout.ci_test_data(git_repo='https://equiv.googlesource.com/b')
- + commit_data('b2')
- + read_step_data()
- + api.roll_util.forward_roll()
- + api.auto_roller.dry_run_success()
+ ),
+ api.checkout.ci_test_data(git_repo='https://equiv.googlesource.com/b'),
+ commit_data('b2'),
+ read_step_data(),
+ api.roll_util.forward_roll(),
+ api.auto_roller.dry_run_success(),
)
- yield (
- api.test('upstream-not-set')
- + properties(api, path='c3')
- + api.checkout.ci_test_data(git_repo='https://bar.googlesource.com/c')
- + commit_data('c3')
- + read_step_data()
- + api.auto_roller.dry_run_success()
+ yield api.test(
+ 'upstream-not-set',
+ properties(api, path='c3'),
+ api.checkout.ci_test_data(git_repo='https://bar.googlesource.com/c'),
+ commit_data('c3'),
+ read_step_data(),
+ api.auto_roller.dry_run_success(),
)
- yield (
- api.test('upstream-not-set-revision-not-branch', status='FAILURE')
- + properties(api, path='d4')
- + api.checkout.ci_test_data(git_repo='https://bar.googlesource.com/c')
- + read_step_data()
+ yield api.test(
+ 'upstream-not-set-revision-not-branch',
+ properties(api, path='d4'),
+ api.checkout.ci_test_data(git_repo='https://bar.googlesource.com/c'),
+ read_step_data(),
+ status='FAILURE',
)
- yield (
- api.test('no-trigger-with-upstream')
- + properties(api, path='a1')
- + commit_data('a1')
- + read_step_data()
- + api.step_data(
+ yield api.test(
+ 'no-trigger-with-upstream',
+ properties(api, path='a1'),
+ commit_data('a1'),
+ read_step_data(),
+ api.step_data(
'git log',
stdout=api.raw_io.output_text('hash-from-special-checkout'),
- )
- + api.roll_util.forward_roll()
- + api.auto_roller.dry_run_success()
+ ),
+ api.roll_util.forward_roll(),
+ api.auto_roller.dry_run_success(),
)
- yield (
- api.test('no-trigger-with-revision-branch')
- + properties(api, path='c3')
- + commit_data('c3')
- + read_step_data()
- + api.step_data(
+ yield api.test(
+ 'no-trigger-with-revision-branch',
+ properties(api, path='c3'),
+ commit_data('c3'),
+ read_step_data(),
+ api.step_data(
'git log',
stdout=api.raw_io.output_text('hash-from-special-checkout'),
- )
- + api.auto_roller.dry_run_success()
+ ),
+ api.auto_roller.dry_run_success(),
)
- yield (
- api.test('no-trigger-with-revision-hash', status='FAILURE')
- + properties(api, path='d4')
- + read_step_data()
- + api.step_data(
+ yield api.test(
+ 'no-trigger-with-revision-hash',
+ properties(api, path='d4'),
+ read_step_data(),
+ api.step_data(
'git log',
stdout=api.raw_io.output_text('hash-from-special-checkout'),
- )
+ ),
+ status='FAILURE',
)
- yield (
- api.test('no-trigger-with-revision-tag', status='FAILURE')
- + properties(api, path='e5')
- + read_step_data()
- + api.step_data(
+ yield api.test(
+ 'no-trigger-with-revision-tag',
+ properties(api, path='e5'),
+ read_step_data(),
+ api.step_data(
'git log',
stdout=api.raw_io.output_text('hash-from-special-checkout'),
- )
+ ),
+ status='FAILURE',
)
- yield (
- api.test('backwards')
- + properties(api, path='a1')
- + api.checkout.ci_test_data(git_repo='https://foo.googlesource.com/a')
- + read_step_data()
- + api.roll_util.backward_roll()
+ yield api.test(
+ 'backwards',
+ properties(api, path='a1'),
+ api.checkout.ci_test_data(git_repo='https://foo.googlesource.com/a'),
+ read_step_data(),
+ api.roll_util.backward_roll(),
)
- yield (
- api.test('host-dot-dot')
- + properties(api, path='f6')
- + api.checkout.ci_test_data(git_repo='https://host.googlesource.com/f')
- + commit_data('f6')
- + read_step_data()
- + api.auto_roller.dry_run_success()
+ yield api.test(
+ 'host-dot-dot',
+ properties(api, path='f6'),
+ api.checkout.ci_test_data(git_repo='https://host.googlesource.com/f'),
+ commit_data('f6'),
+ read_step_data(),
+ api.auto_roller.dry_run_success(),
)
- yield (
- api.test('dotdot-prefix')
- + properties(api, path='g7')
- + api.checkout.ci_test_data(
+ yield api.test(
+ 'dotdot-prefix',
+ properties(api, path='g7'),
+ api.checkout.ci_test_data(
git_repo='https://host.googlesource.com/prefix/g'
- )
- + commit_data('g7')
- + read_step_data()
- + api.auto_roller.dry_run_success()
+ ),
+ commit_data('g7'),
+ read_step_data(),
+ api.auto_roller.dry_run_success(),
)
- yield (
- api.test('host-prefix')
- + properties(api, path='h8')
- + api.checkout.ci_test_data(
+ yield api.test(
+ 'host-prefix',
+ properties(api, path='h8'),
+ api.checkout.ci_test_data(
git_repo='https://host.googlesource.com/prefix/h'
- )
- + commit_data('h8')
- + read_step_data()
- + api.auto_roller.dry_run_success()
+ ),
+ commit_data('h8'),
+ read_step_data(),
+ api.auto_roller.dry_run_success(),
)