commit | 0c7d0408e330823f5ffe78564c18d56b3628738a | [log] [tgz] |
---|---|---|
author | Edwin Kempin <ekempin@google.com> | Wed Nov 25 13:53:09 2020 +0100 |
committer | Edwin Kempin <ekempin@google.com> | Fri Nov 27 13:52:31 2020 +0100 |
tree | 8ae7c73b2249741a53d40d529c6fcd49a9182baa | |
parent | 1ed330eee5bb8f6d81d5f423094148d91b6bada5 [diff] |
AbstractRequiredApprovalConfigTest: Improve readability of 2 tests 1. testGetFromGlobalPluginConfig: This method in the base class verified that "Code-Review+2" was configured, but this configuration was done in the child classes via an annotation. Due to this just looking at the testGetFromGlobalPluginConfig() method it's unclear how the assertions can work. To understand the assertions one must look at the calling code. This is bad. Inline the method to improve the test readability, even if it means that a small amount of code is being duplicated. After doing this we can now use a more realistic label for the getFromGlobalPluginConfig() test in OverrideApprovalConfigTest. 2. testCannotGetFromGlobalPluginConfigIfConfigIsInvalid: Again the assertion only makes sense if you know the calling code. Provide the invalid value as input, so that the assertion become more readable. Signed-off-by: Edwin Kempin <ekempin@google.com> Change-Id: I22a639cb878787fff8134ec4f3fcf397d21a1a20
This plugin provides support for defining code owners for files in a repository.
If the code-owners plugin is enabled, changes can only be submitted if all touched files are covered by approvals from code owners.
Also see resources/Documentation/about.md
IMPORTANT: Before installing/enabling the plugin follow the instructions from the setup guide, see resources/Documentation/setup-guide.md