Skip to content

Commit

Permalink
Add a fixture that specifies yagna commit hash to use in a single test
Browse files Browse the repository at this point in the history
  • Loading branch information
azawlocki committed Apr 9, 2021
1 parent 5fbc0c3 commit 9ee0297
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion test/yagna/module/payments/test_payment_driver_list_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import logging
from pathlib import Path
from typing import List
from typing import List, Optional

import pytest

Expand All @@ -15,10 +15,34 @@
from goth.runner.container.payment import PaymentIdPool
from goth.runner.container.yagna import YagnaContainerConfig
from goth.runner.requestor import RequestorProbeWithApiSteps
from goth.runner.container.build import YagnaBuildEnvironment


logger = logging.getLogger(__name__)


@pytest.fixture(scope="module")
def yagna_build_env(
assets_path: Path,
yagna_binary_path: Optional[Path],
yagna_branch: Optional[str],
# yagna_commit_hash: Optional[str],
deb_package: Optional[Path],
yagna_release: Optional[str],
) -> YagnaBuildEnvironment:
"""Override the default fixture to force using specific yagna commit."""

"""Fixture which provides the build environment for yagna Docker images."""
return YagnaBuildEnvironment(
docker_dir=assets_path / "docker",
binary_path=yagna_binary_path,
branch=yagna_branch,
commit_hash="c4d1dd7",
deb_path=deb_package,
release_tag=yagna_release,
)


def _topology(payment_id_pool: PaymentIdPool) -> List[YagnaContainerConfig]:
# Nodes are configured to communicate via proxy

Expand Down

0 comments on commit 9ee0297

Please sign in to comment.