1
0
mirror of https://github.com/j178/prek.git synced 2026-04-30 10:20:26 +02:00
Files
prek/tests/languages/docker.rs
T
Luiz Otavio Vilas Boas Oliveira e5b2375fe7 Add moving rev warning (#488)
* Warn user when revs are found

* Lint

* Update test snapshots

* Fix snapshot

* Tweak message

* Update tests

* fix tests

---------

Co-authored-by: Jo <10510431+j178@users.noreply.github.com>
2025-08-20 18:14:55 +08:00

34 lines
880 B
Rust

use crate::common::{TestContext, cmd_snapshot};
/// GitHub Action only has docker for linux hosted runners.
#[test]
fn docker() {
let context = TestContext::new();
context.init_project();
context.write_pre_commit_config(indoc::indoc! {r#"
repos:
- repo: https://github.com/prek-test-repos/docker-hooks
rev: v1.0
hooks:
- id: hello-world
entry: "echo Hello, world!"
verbose: true
always_run: true
"#});
context.git_add(".");
cmd_snapshot!(context.filters(), context.run(), @r#"
success: true
exit_code: 0
----- stdout -----
Hello World..............................................................Passed
- hook id: hello-world
- duration: [TIME]
Hello, world! .pre-commit-config.yaml
----- stderr -----
"#);
}