One of the error cases wasn't covered yet.
Change-Id: I762b37c7448c0f689248a99bad0b206d7cf63d73
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,