diff options
author | Oliver Chang <oliverchang@users.noreply.github.com> | 2020-08-11 16:25:08 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-11 16:25:08 +1000 |
commit | ade417ba20fb52e1340a1ee06e7272fc664fbed8 (patch) | |
tree | 112b406eaf315477516cb197d795dd05c47e998f /infra/build | |
parent | e0a94e1a0924a1e2460f5de5abad9ee6b5acad7d (diff) | |
download | oss-fuzz-ade417ba20fb52e1340a1ee06e7272fc664fbed8.tar.gz |
Fix typo in project_sync.py (#4296)
* Fix typo in project_sync.py
* line length
* format
Diffstat (limited to 'infra/build')
-rw-r--r-- | infra/build/functions/project_sync.py | 2 | ||||
-rw-r--r-- | infra/build/functions/project_sync_test.py | 16 |
2 files changed, 8 insertions, 10 deletions
diff --git a/infra/build/functions/project_sync.py b/infra/build/functions/project_sync.py index e695a3a6a..5cff66206 100644 --- a/infra/build/functions/project_sync.py +++ b/infra/build/functions/project_sync.py @@ -88,7 +88,7 @@ def update_scheduler(cloud_scheduler_client, project, schedule): } update_mask = {'schedule': schedule} - cloud_scheduler_client.update(job, update_mask) + cloud_scheduler_client.update_job(job, update_mask) # pylint: disable=too-many-branches diff --git a/infra/build/functions/project_sync_test.py b/infra/build/functions/project_sync_test.py index 4d7214f42..747a2761d 100644 --- a/infra/build/functions/project_sync_test.py +++ b/infra/build/functions/project_sync_test.py @@ -84,7 +84,7 @@ class CloudSchedulerClient: self.schedulers.remove(job) break - def update(self, job, update_mask): + def update_job(self, job, update_mask): """Simulate update jobs.""" for existing_job in self.schedulers: if existing_job == job: @@ -154,26 +154,24 @@ class TestDataSync(unittest.TestCase): self.assertCountEqual([ { - 'name': - 'projects/test-project/location/us-central1/jobs/test2-scheduler-fuzzing', + 'name': 'projects/test-project/location/us-central1/jobs/' + 'test2-scheduler-fuzzing', 'pubsub_target': { 'topic_name': 'projects/test-project/topics/request-build', 'data': b'test2' }, - 'schedule': - '0 7 * * *' + 'schedule': '0 7 * * *' }, { - 'name': - 'projects/test-project/location/us-central1/jobs/test2-scheduler-coverage', + 'name': 'projects/test-project/location/us-central1/jobs/' + 'test2-scheduler-coverage', 'pubsub_target': { 'topic_name': 'projects/test-project/topics/request-coverage-build', 'data': b'test2' }, - 'schedule': - '0 6 * * *' + 'schedule': '0 6 * * *' }, ], cloud_scheduler_client.schedulers) |