mononoke: Remove path from hook config

Summary:
The configerator thrift file was updated to remove a path from hook
config. However, this change wasn't synced to fbsource.

Sync the change and fix up the tests that are broken by this change.

Reviewed By: krallin

Differential Revision: D21594221

fbshipit-source-id: 7b64180914f6c6802e4d70fcb1a5d6ec36eb2eac
This commit is contained in:
Harvey Hunt 2020-05-15 08:07:46 -07:00 committed by Facebook GitHub Bot
parent 6676a7a476
commit a26f1d21cb
2 changed files with 1 additions and 10 deletions

View File

@ -1,4 +1,4 @@
// @generated SignedSource<<51ad26a74a8b8a08603d8de948f191e4>>
// @generated SignedSource<<fa3ebdf6c93b1612740c3d7219905a4a>>
// DO NOT EDIT THIS FILE MANUALLY!
// This file is a mechanical copy of the version in the configerator repo. To
// modify it, edit the copy in the configerator repo instead and copy it over by
@ -286,7 +286,6 @@ struct RawHookManagerParams {
struct RawHookConfig {
1: string name,
2: optional string path,
3: string hook_type,
4: optional string bypass_commit_string,
5: optional string bypass_pushvar,

View File

@ -1413,7 +1413,6 @@ mod test {
[[hooks]]
name="hook1"
path="common/hooks/hook1.lua"
hook_type="PerAddedOrModifiedFile"
bypass_commit_string="@allow_hook1"
@ -1746,8 +1745,6 @@ mod test {
#[fbinit::test]
fn test_broken_bypass_config(fb: FacebookInit) {
// Two bypasses for one hook
let hook1_content = "this is hook1";
let content = r#"
repoid=0
storage_config = "sqlite"
@ -1764,14 +1761,12 @@ mod test {
hook_name="hook1"
[[hooks]]
name="hook1"
path="common/hooks/hook1.lua"
hook_type="PerAddedOrModifiedFile"
bypass_commit_string="@allow_hook1"
bypass_pushvar="var=val"
"#;
let paths = btreemap! {
"common/hooks/hook1.lua" => hook1_content,
"common/commitsyncmap.toml" => "",
"repos/fbsource/server.toml" => content,
};
@ -1785,7 +1780,6 @@ mod test {
assert!(msg.contains("TooManyBypassOptions"));
// Incorrect bypass string
let hook1_content = "this is hook1";
let content = r#"
repoid=0
storage_config = "sqlite"
@ -1802,13 +1796,11 @@ mod test {
hook_name="hook1"
[[hooks]]
name="hook1"
path="common/hooks/hook1.lua"
hook_type="PerAddedOrModifiedFile"
bypass_pushvar="var"
"#;
let paths = btreemap! {
"common/hooks/hook1.lua" => hook1_content,
"common/commitsyncmap.toml" => "",
"repos/fbsource/server.toml" => content,
};