1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +01:00

When running unit tests, ignore any custom task fields

Summary:
If you have `maniphest.custom-field-definitions` set to include "required" fields, a bunch of tests which create tasks can fail.

To avoid this, reset this config while running tests.

This mechanism should probably be more general (e.g., reset all config by default, only whitelist some config) but just fix this for now since it's a one-liner and doesn't make eventual cleanup any harder.

Test Plan: Ran `arc unit`, hitting tests that create tasks.

Reviewers: chad, 20after4

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D17595
This commit is contained in:
epriestley 2017-04-02 08:46:37 -07:00
parent 1c5503cb29
commit 515cb98819

View file

@ -128,6 +128,10 @@ abstract class PhabricatorTestCase extends PhutilTestCase {
$this->env->overrideEnvConfig('phabricator.silent', false);
$this->env->overrideEnvConfig('cluster.read-only', false);
$this->env->overrideEnvConfig(
'maniphest.custom-field-definitions',
array());
}
protected function didRunTests() {