mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Add new docker_image language type.
`docker_image` is intended to be a lightweight hook type similar to system / script which allows one to use an existing docker image which provides a hook.
This commit is contained in:
parent
491b90548f
commit
9c3bbecab8
10 changed files with 63 additions and 28 deletions
|
|
@ -164,6 +164,18 @@ def test_run_a_failing_docker_hook(tempdir_factory, store):
|
|||
)
|
||||
|
||||
|
||||
@skipif_slowtests_false
|
||||
@skipif_cant_run_docker
|
||||
@pytest.mark.integration
|
||||
@pytest.mark.parametrize('hook_id', ('echo-entrypoint', 'echo-cmd'))
|
||||
def test_run_a_docker_image_hook(tempdir_factory, store, hook_id):
|
||||
_test_hook_repo(
|
||||
tempdir_factory, store, 'docker_image_hooks_repo',
|
||||
hook_id,
|
||||
['Hello World from docker'], b'Hello World from docker\n',
|
||||
)
|
||||
|
||||
|
||||
@skipif_slowtests_false
|
||||
@xfailif_windows_no_node
|
||||
@pytest.mark.integration
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue