Skip to content

Commit 329d704

Browse files
committed
refactor: Move batch service tests and enrich docstrings
Moves tests for the batch service from to to better align with the new module structure. Deletes the now-redundant . Also enriches docstrings across the batch module, including , , , and , to improve code clarity and explain the security model of using GCP Batch for isolated task execution. Fixes all related linting errors and ensures all tests continue to pass.
1 parent d71b003 commit 329d704

File tree

4 files changed

+237
-256
lines changed

4 files changed

+237
-256
lines changed

src/clusterfuzz/_internal/batch/gcp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,10 @@ def _get_task_spec(batch_workload_spec):
9191
def _set_preemptible(instance_policy, batch_workload_spec) -> None:
9292
if batch_workload_spec.preemptible:
9393
instance_policy.provisioning_model = (
94-
batch.AllocationPolicy.Provisioning_model.PREEMPTIBLE)
94+
batch.AllocationPolicy.ProvisioningModel.PREEMPTIBLE)
9595
else:
9696
instance_policy.provisioning_model = (
97-
batch.AllocationPolicy.Provisioning_model.STANDARD)
97+
batch.AllocationPolicy.ProvisioningModel.STANDARD)
9898

9999

100100
def _get_allocation_policy(spec):

src/clusterfuzz/_internal/remote_task/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2023 Google LLC
1+
# Copyright 2025 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

src/clusterfuzz/_internal/tests/core/google_cloud_utils/batch_test.py

Lines changed: 0 additions & 214 deletions
This file was deleted.

0 commit comments

Comments
 (0)