Skip to content

Commit

Permalink
Fix imports after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
alonsodomin committed Aug 2, 2022
1 parent ff0b186 commit 0a9eae6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 2 additions & 0 deletions src/python/pants/backend/helm/dependency_inference/chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
HelmChartMetaSourceField,
HelmChartTarget,
)
from pants.backend.helm.target_types import rules as helm_target_types_rules
from pants.backend.helm.util_rules.chart_metadata import HelmChartDependency, HelmChartMetadata
from pants.engine.addresses import Address
from pants.engine.internals.selectors import Get, MultiGet
Expand Down Expand Up @@ -160,5 +161,6 @@ def rules():
return [
*collect_rules(),
*artifacts.rules(),
*helm_target_types_rules(),
UnionRule(InferDependenciesRequest, InferHelmChartDependenciesRequest),
]
15 changes: 8 additions & 7 deletions src/python/pants/backend/helm/util_rules/chart_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@

import pytest

from pants.backend.helm.target_types import HelmArtifactTarget, HelmChartTarget
from pants.backend.helm.target_types import (
HelmArtifactTarget,
HelmChartTarget,
HelmDeploymentFieldSet,
HelmDeploymentTarget,
)
from pants.backend.helm.target_types import rules as target_types_rules
from pants.backend.helm.testutil import (
HELM_TEMPLATE_HELPERS_FILE,
Expand Down Expand Up @@ -35,10 +40,6 @@ def rule_runner() -> RuleRunner:
target_types=[HelmChartTarget, HelmArtifactTarget, HelmDeploymentTarget],
rules=[
*chart.rules(),
*sources.rules(),
*tool.rules(),
*process.rules(),
*stripped_source_files.rules(),
*target_types_rules(),
QueryRule(HelmChart, (HelmChartRequest,)),
QueryRule(HelmChartMetadata, (ParseHelmChartMetadataDigest,)),
Expand Down Expand Up @@ -302,7 +303,7 @@ def test_obtain_chart_from_deployment(rule_runner: RuleRunner) -> None:
assert chart.info.version == "1.0.0"


def test_fail_when_no_chart_dependency_is_found(rule_runner: RuleRunner) -> None:
def test_fail_when_no_chart_dependency_is_found_for_a_deployment(rule_runner: RuleRunner) -> None:
rule_runner.write_files({"BUILD": """helm_deployment(name="foo")"""})

target = rule_runner.get_target(Address("", target_name="foo"))
Expand All @@ -313,7 +314,7 @@ def test_fail_when_no_chart_dependency_is_found(rule_runner: RuleRunner) -> None
rule_runner.request(HelmChart, [FindHelmDeploymentChart(field_set)])


def test_fail_when_more_than_one_chart_is_found(rule_runner: RuleRunner) -> None:
def test_fail_when_more_than_one_chart_is_found_for_a_deployment(rule_runner: RuleRunner) -> None:
rule_runner.write_files(
{
"src/foo/BUILD": "helm_chart()",
Expand Down

0 comments on commit 0a9eae6

Please sign in to comment.