mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 00:04:42 +04:00
fix docker_image test when ubuntu:22.04 image is not pre-pulled
This commit is contained in:
parent
1027596280
commit
aa85be9340
1 changed files with 8 additions and 0 deletions
|
|
@ -1,10 +1,18 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import pytest
|
||||
|
||||
from pre_commit.languages import docker_image
|
||||
from pre_commit.util import cmd_output_b
|
||||
from testing.language_helpers import run_language
|
||||
from testing.util import xfailif_windows
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True, scope='module')
|
||||
def _ensure_image_available():
|
||||
cmd_output_b('docker', 'run', '--rm', 'ubuntu:22.04', 'echo')
|
||||
|
||||
|
||||
@xfailif_windows # pragma: win32 no cover
|
||||
def test_docker_image_hook_via_entrypoint(tmp_path):
|
||||
ret = run_language(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue