Skip to content

Commit

Permalink
Initialize config for caching tests
Browse files Browse the repository at this point in the history
  • Loading branch information
saville committed Dec 19, 2024
1 parent 4992f86 commit 89cbafc
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion tests/test_caching.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from time import sleep
from unittest import mock

from buildrunner import BuildRunner
from buildrunner import BuildRunner, BuildRunnerConfig
from buildrunner.docker.runner import DockerRunner
from buildrunner.loggers import ConsoleLogger
import pytest
Expand All @@ -28,6 +28,25 @@ def _tar_safe_extractall(tar, path=".", members=None, *, numeric_owner=False):
tar.extractall(path, members, numeric_owner=numeric_owner)


@pytest.fixture(name="initialize_config", autouse=True)
def fixture_initialize_config(tmp_path):
buildrunner_path = tmp_path / "buildrunner.yaml"
buildrunner_path.write_text("steps: {'step1': {}}")
BuildRunnerConfig.initialize_instance(
build_id="123",
vcs=None,
build_dir=str(tmp_path),
global_config_file=None,
run_config_file=str(buildrunner_path),
build_time=0,
build_number=1,
push=False,
steps_to_run=None,
log_generated_files=False,
global_config_overrides={},
)


@pytest.fixture(name="runner")
def fixture_setup_runner():
image_config = DockerRunner.ImageConfig(
Expand Down

0 comments on commit 89cbafc

Please sign in to comment.