mirror of
https://github.com/adnanh/webhook.git
synced 2026-07-26 17:19:17 +08:00
Add tests for capturing command output
and fix running tests on macOS, where there is no /bin/true...
This commit is contained in:
@@ -136,5 +136,49 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "capture-command-output-on-success-not-by-default",
|
||||
"pass-arguments-to-command": [
|
||||
{
|
||||
"source": "string",
|
||||
"name": "exit=0"
|
||||
}
|
||||
],
|
||||
"execute-command": "{{ .Hookecho }}"
|
||||
},
|
||||
{
|
||||
"id": "capture-command-output-on-success-yes-with-flag",
|
||||
"pass-arguments-to-command": [
|
||||
{
|
||||
"source": "string",
|
||||
"name": "exit=0"
|
||||
}
|
||||
],
|
||||
"execute-command": "{{ .Hookecho }}",
|
||||
"include-command-output-in-response": true
|
||||
},
|
||||
{
|
||||
"id": "capture-command-output-on-error-not-by-default",
|
||||
"pass-arguments-to-command": [
|
||||
{
|
||||
"source": "string",
|
||||
"name": "exit=1"
|
||||
}
|
||||
],
|
||||
"execute-command": "{{ .Hookecho }}",
|
||||
"include-command-output-in-response": true
|
||||
},
|
||||
{
|
||||
"id": "capture-command-output-on-error-yes-with-extra-flag",
|
||||
"pass-arguments-to-command": [
|
||||
{
|
||||
"source": "string",
|
||||
"name": "exit=1"
|
||||
}
|
||||
],
|
||||
"execute-command": "{{ .Hookecho }}",
|
||||
"include-command-output-in-response": true,
|
||||
"include-command-output-in-response-on-error": true
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user