mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Merge pull request #3374 from pre-commit/docker-image-tests-ubuntu-22-not-present
fix docker_image test when ubuntu:22.04 image is not pre-pulled
This commit is contained in:
commit
31cb945ffb
1 changed files with 8 additions and 0 deletions
|
|
@ -1,10 +1,18 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
from pre_commit.languages import docker_image
|
from pre_commit.languages import docker_image
|
||||||
|
from pre_commit.util import cmd_output_b
|
||||||
from testing.language_helpers import run_language
|
from testing.language_helpers import run_language
|
||||||
from testing.util import xfailif_windows
|
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
|
@xfailif_windows # pragma: win32 no cover
|
||||||
def test_docker_image_hook_via_entrypoint(tmp_path):
|
def test_docker_image_hook_via_entrypoint(tmp_path):
|
||||||
ret = run_language(
|
ret = run_language(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue