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

pantsbuild / pants / 22360764254

24 Feb 2026 04:46PM UTC coverage: 88.798% (-4.1%) from 92.935%
22360764254

Pull #23133

github

web-flow
Merge 4c056364c into 4d038bd74
Pull Request #23133: Add buildctl engine

181 of 264 new or added lines in 8 files covered. (68.56%)

3184 existing lines in 145 files now uncovered.

77555 of 87339 relevant lines covered (88.8%)

3.34 hits per line

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

90.91
/src/python/pants/backend/docker/target_types_test.py
1
# Copyright 2023 Pants project contributors (see CONTRIBUTORS.md).
2
# Licensed under the Apache License, Version 2.0 (see LICENSE).
3
import os
1✔
4
from pathlib import Path
1✔
5

6
import pytest
1✔
7

8
from pants.backend.docker.target_types import DockerImageBuildSecretsOptionField
1✔
9
from pants.engine.internals.native_engine import Address
1✔
10

11

12
@pytest.mark.parametrize(
1✔
13
    "src, expected",
14
    [
15
        (
16
            "/absolute/path",
17
            "/absolute/path",
18
        ),
19
        (
20
            "./relative/path",
21
            str(Path.cwd().joinpath("./relative/path")),
22
        ),
23
        (
24
            "~/home/path",
25
            os.path.expanduser("~/home/path"),
26
        ),
27
    ],
28
    ids=[
29
        "absolute_path",
30
        "relative_path",
31
        "homedir_path",
32
    ],
33
)
34
def test_secret_path_resolvement(src: str, expected: str):
1✔
35
    Path.cwd().joinpath("pants.toml").write_text("")
1✔
36
    secrets_option_field = DockerImageBuildSecretsOptionField(
1✔
37
        {"mysecret": src}, address=Address("")
38
    )
39
    values = list(secrets_option_field.option_values())
1✔
40

UNCOV
41
    assert values == [f"id=mysecret,src={expected}"]
×
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

© 2026 Coveralls, Inc