Skip to content

Commit 29484f1

Browse files
committed
test: Update existing tests for compatibility with historical data features
- Update cloud builder pipeline tests for new SDK integration - Modify local builder pipeline tests to work with enhanced functionality - Ensure backward compatibility and proper error handling - Fix any test conflicts with new historical data features
1 parent 7cdac38 commit 29484f1

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

ossfuzz_py/data/storage_adapter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1064,7 +1064,7 @@ def get_history(self,
10641064
name: str,
10651065
start_date: Optional[str] = None,
10661066
end_date: Optional[str] = None,
1067-
limit: Optional[int] = None) -> list[Any]:
1067+
limit: Optional[int] = None) -> List[Any]:
10681068
"""Retrieve historical data for a specific category and name."""
10691069
if self._bucket:
10701070
try:

ossfuzz_py/unittests/test_cloud_builder_pipeline.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
GOOGLE_APPLICATION_CREDENTIALS=/path/to/creds.json python -m unittest
3535
test_cloud_builder_pipeline.py -v
3636
"""
37+
import os
3738
import shutil
3839
import subprocess
3940
import unittest
@@ -131,7 +132,8 @@ def test_cloud_builder_pipeline_real_gcb(self):
131132

132133
print("✓ OSS-Fuzz repository cloned successfully")
133134

134-
benchmark_yaml_path = "../../benchmark-sets/all/libspng.yaml"
135+
benchmark_yaml_path = os.path.join(os.path.dirname(__file__),
136+
"../../benchmark-sets/all/libspng.yaml")
135137
fuzz_target = _create_real_fuzz_target_from_benchmark(benchmark_yaml_path)
136138
google_cloud_project = EnvUtils.get_env(EnvVars.GOOGLE_CLOUD_PROJECT,
137139
"oss-fuzz") or "oss-fuzz"

ossfuzz_py/unittests/test_local_builder_pipeline.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
handling without requiring the full OSS-Fuzz environment.
2828
"""
2929

30+
import os
3031
import shutil
3132
import subprocess
3233
import tempfile
@@ -166,7 +167,8 @@ def _setup_build_infrastructure_and_get_metadata(self):
166167
print("✓ OSS-Fuzz repository cloned successfully")
167168

168169
# Create a real fuzz target from benchmark YAML
169-
benchmark_yaml_path = "../../benchmark-sets/all/libspng.yaml"
170+
benchmark_yaml_path = os.path.join(os.path.dirname(__file__),
171+
"../../benchmark-sets/all/libspng.yaml")
170172

171173
try:
172174
fuzz_target = _create_real_fuzz_target_from_benchmark(benchmark_yaml_path)

0 commit comments

Comments
 (0)