summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJustin Worthe <justin@jemstep.com>2020-02-03 11:45:14 +0200
committerJustin Worthe <justin@jemstep.com>2020-02-03 11:45:14 +0200
commitd92a3109599847823c450ef4fae88c0a9b840504 (patch)
treeb20b274ba4986e21c8804f64bb702dc6387ab98c /tests
parent11701a7d00aebfa4022bc7157869e769349ff67f (diff)
PYKE-11909: Revived test for configured mainline
Diffstat (limited to 'tests')
-rw-r--r--tests/policies_test.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/policies_test.rs b/tests/policies_test.rs
index abdd047..bff0834 100644
--- a/tests/policies_test.rs
+++ b/tests/policies_test.rs
@@ -261,6 +261,27 @@ fn verify_git_commits_author_merged_own_code_not_on_head() {
}
#[test]
+fn verify_git_commits_author_merged_own_code_on_configured_mainline() {
+ before_all();
+ let result = policies::verify_git_commits::<LiveGit, MockGpg>(
+ &LiveGit::new(
+ "./",
+ GitConfig {
+ mainlines: vec!["m*".into()],
+ },
+ )
+ .unwrap(),
+ MockGpg,
+ &verify_commits_config(),
+ "eb5e0185546b0bb1a13feec6b9ee8b39985fea42",
+ "6004dfdb071c71e5e76ad55b924b576487e1c485",
+ "refs/heads/master",
+ )
+ .unwrap();
+ assert!(result.is_err());
+}
+
+#[test]
fn verify_git_commits_author_trivial_merge_between_mainlines() {
before_all();
let result = policies::verify_git_commits::<LiveGit, MockGpg>(