diff options
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/noPassthrough/http_client_keep_alive.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/jstests/noPassthrough/http_client_keep_alive.js b/jstests/noPassthrough/http_client_keep_alive.js index 689231dbe03..6af354aa7a9 100644 --- a/jstests/noPassthrough/http_client_keep_alive.js +++ b/jstests/noPassthrough/http_client_keep_alive.js @@ -49,6 +49,11 @@ function runTest(mongod, web) { admin.runCommand({httpClientRequest: 1, uri: web.getURL() + '/connect_count'}); const connects = assert.commandWorked(connectsCmd).body; assert.eq(connects, 2, "Connection count incorrect."); + + // Check 404 returns failure. + const failedCmd = assert.commandWorked( + admin.runCommand({httpClientRequest: 1, uri: web.getURL() + '/no_such_path'})); + assert.eq(failedCmd.code, 404); } const web = new ConfigExpandRestServer(); |