jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403980 )
Change subject: config: Increase coverage of EtcdConfig::parseDirectory() ...................................................................... config: Increase coverage of EtcdConfig::parseDirectory() One of the error cases wasn't covered yet. Change-Id: I762b37c7448c0f689248a99bad0b206d7cf63d73 --- M tests/phpunit/includes/config/EtcdConfigTest.php 1 file changed, 20 insertions(+), 0 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/phpunit/includes/config/EtcdConfigTest.php b/tests/phpunit/includes/config/EtcdConfigTest.php index 7a4d9d9..379eebd 100644 --- a/tests/phpunit/includes/config/EtcdConfigTest.php +++ b/tests/phpunit/includes/config/EtcdConfigTest.php @@ -461,6 +461,26 @@ false // retry ], ], + '200 OK - Directory with non-array "nodes" key' => [ + 'http' => [ + 'code' => 200, + 'reason' => 'OK', + 'headers' => [], + 'body' => json_encode( [ 'node' => [ 'nodes' => [ + [ + 'key' => '/example/a', + 'dir' => true, + 'nodes' => 'not an array' + ], + ] ] ] ), + 'error' => '', + ], + 'expect' => [ + null, + "Unexpected JSON response in dir 'a'; 'nodes' is not an array.", + false // retry + ], + ], '200 OK - Correctly encoded garbage response' => [ 'http' => [ 'code' => 200, -- To view, visit https://gerrit.wikimedia.org/r/403980 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I762b37c7448c0f689248a99bad0b206d7cf63d73 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Krinkle <krinklem...@gmail.com> Gerrit-Reviewer: Aaron Schulz <asch...@wikimedia.org> Gerrit-Reviewer: Imarlier <imarl...@wikimedia.org> Gerrit-Reviewer: Legoktm <lego...@member.fsf.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits