• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pantsbuild / pants / 18517631058

15 Oct 2025 04:18AM UTC coverage: 69.207% (-11.1%) from 80.267%
18517631058

Pull #22745

github

web-flow
Merge 642a76ca1 into 99919310e
Pull Request #22745: [windows] Add windows support in the stdio crate.

53815 of 77759 relevant lines covered (69.21%)

2.42 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/python/pants/backend/helm/subsystems/unittest.py
1
# Copyright 2022 Pants project contributors (see CONTRIBUTORS.md).
2
# Licensed under the Apache License, Version 2.0 (see LICENSE).
3

4
from enum import Enum
×
5

6
from pants.backend.helm.util_rules.tool import (
×
7
    ExternalHelmPlugin,
8
    ExternalHelmPluginBinding,
9
    ExternalHelmPluginRequest,
10
)
11
from pants.core.goals.resolves import ExportableTool
×
12
from pants.engine.platform import Platform
×
13
from pants.engine.rules import collect_rules, rule
×
14
from pants.engine.unions import UnionRule
×
15
from pants.option.option_types import BoolOption, EnumOption, SkipOption
×
16

17

18
class HelmUnitTestReportFormat(Enum):
×
19
    """The report format used for the unit tests."""
20

21
    XUNIT = "XUnit"
×
22
    NUNIT = "NUnit"
×
23
    JUNIT = "JUnit"
×
24

25

26
class HelmUnitTestSubsystem(ExternalHelmPlugin):
×
27
    options_scope = "helm-unittest"
×
28
    plugin_name = "unittest"
×
29
    help = "BDD styled unit test framework for Kubernetes Helm charts as a Helm plugin. (https://github.com/helm-unittest)"
×
30

31
    default_version = "1.0.1"
×
32
    default_known_versions = [
×
33
        "1.0.1|macos_x86_64|3d6e88fce7d177025c47e840d804d1ef195c2fb07581797be477b002901f32d9|25991137",
34
        "1.0.1|macos_arm64|92c5f3bcef1b75337d07ba05d48b40ec2190bc8a4fb4ba05e93664f93e28afa0|24374980",
35
        "1.0.1|linux_x86_64|7e99822df43aaf25e198d0b5c950c1d31d1c5baa528adee8fa9b4063a761aced|26056496",
36
        "1.0.1|linux_arm64|68e8ec894408bfd5a53de6299248cb438555a42b4cae1463a3fe4a4240dcbcd4|23979610",
37
        "0.8.0|macos_x86_64|4dfe519a0f0172e179f5a624f0a5fb20c3fa12737b182a1e244fda87e2dc2a7a|24199798",
38
        "0.8.0|macos_arm64|8275958346cc934c19b06bfc76f4a837ec7ab4c38f8cf8e980b7b93aa6b4d838|22776975",
39
        "0.8.0|linux_x86_64|3f436992adcc59a5e640d3d2889ccb275f22ad7cde8c8b8354b24728f4dd6f99|24293223",
40
        "0.8.0|linux_arm64|ca8be393510f4afad9ec64a6ba2666aae6333bd92169b249533aeaba440a61ec|22473391",
41
        "0.3.3|macos_x86_64|b2298a513b3cb6482ba2e42079c93ad18be8a31a230bd4dffdeb01ec2881d0f5|21497144",
42
        "0.3.3|macos_arm64|2365f5b3a99e6fc83218457046378b14039a3992e9ae96a4192bc2e43a33c742|20479438",
43
        "0.3.3|linux_x86_64|8ebe20f77012a5d4e7139760cabe36dd1ea38e40b26f57de3f4165d96bd486ff|21685365",
44
        "0.3.3|linux_arm64|7f5e4426428cb9678f971576103df410e6fa38dd19b87fce4729f5217bd5c683|19944514",
45
        "0.2.8|macos_x86_64|1dc95699320894bdebf055c4f4cc084c2cfa0133d3cb7fd6a4c0adca94df5c96|18161928",
46
        "0.2.8|macos_arm64|436e3167c26f71258b96e32c2877b4f97c051064db941de097cf3db2fc861342|17621648",
47
        "0.2.8|linux_x86_64|d7c452559ad4406a1197435394fbcffe51198060de1aa9b4cb6feaf876776ba0|18299096",
48
        "0.2.8|linux_arm64|c793e241b063f0540ad9b4acc0a02e5a101bd9daea5bdf4d8562e9b2337fedb2|16943867",
49
    ]
50
    default_url_template = "https://github.com/helm-unittest/helm-unittest/releases/download/v{version}/helm-unittest-{platform}-{version}.tgz"
×
51
    default_url_platform_mapping = {
×
52
        "linux_arm64": "linux-arm64",
53
        "linux_x86_64": "linux-amd64",
54
        "macos_arm64": "macos-arm64",
55
        "macos_x86_64": "macos-amd64",
56
    }
57

58
    color = BoolOption(
×
59
        "--color",
60
        default=False,
61
        help="Enforce printing colored output even if stdout is not a tty.",
62
    )
63

64
    output_type = EnumOption(
×
65
        default=HelmUnitTestReportFormat.XUNIT,
66
        help="Output type used for the test report.",
67
    )
68

69
    skip = SkipOption("test")
×
70

71
    def generate_exe(self, _: Platform) -> str:
×
72
        return "./untt"
×
73

74

75
class HelmUnitTestPluginBinding(ExternalHelmPluginBinding[HelmUnitTestSubsystem]):
×
76
    plugin_subsystem_cls = HelmUnitTestSubsystem
×
77

78

79
@rule
×
80
async def download_unittest_plugin_request(
×
81
    _: HelmUnitTestPluginBinding, subsystem: HelmUnitTestSubsystem, platform: Platform
82
) -> ExternalHelmPluginRequest:
83
    return ExternalHelmPluginRequest.from_subsystem(subsystem, platform)
×
84

85

86
def rules():
×
87
    return [
×
88
        *collect_rules(),
89
        UnionRule(ExternalHelmPluginBinding, HelmUnitTestPluginBinding),
90
        UnionRule(ExportableTool, HelmUnitTestSubsystem),
91
    ]
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc