diff options
Diffstat (limited to 'jstests/noPassthrough/configExpand_rest_permissions.js')
-rw-r--r-- | jstests/noPassthrough/configExpand_rest_permissions.js | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/jstests/noPassthrough/configExpand_rest_permissions.js b/jstests/noPassthrough/configExpand_rest_permissions.js index 318dd083bab..49749dddb9e 100644 --- a/jstests/noPassthrough/configExpand_rest_permissions.js +++ b/jstests/noPassthrough/configExpand_rest_permissions.js @@ -2,34 +2,34 @@ // @tags: [requires_http_client] (function() { - 'use strict'; +'use strict'; - load('jstests/noPassthrough/libs/configExpand/lib.js'); +load('jstests/noPassthrough/libs/configExpand/lib.js'); - if (_isWindows()) { - print("Skipping test on windows"); - return; - } +if (_isWindows()) { + print("Skipping test on windows"); + return; +} - const web = new ConfigExpandRestServer(); - web.start(); +const web = new ConfigExpandRestServer(); +web.start(); - const sicReflect = { - setParameter: {scramIterationCount: {__rest: web.getStringReflectionURL('12345')}} - }; +const sicReflect = { + setParameter: {scramIterationCount: {__rest: web.getStringReflectionURL('12345')}} +}; - // Positive test just to be sure this works in a basic case before testing negatives. - configExpandSuccess(sicReflect, null, {configExpand: 'rest', chmod: 0o600}); +// Positive test just to be sure this works in a basic case before testing negatives. +configExpandSuccess(sicReflect, null, {configExpand: 'rest', chmod: 0o600}); - // Still successful if writable by others, but not readable. - configExpandSuccess(sicReflect, null, {configExpand: 'rest', chmod: 0o622}); +// Still successful if writable by others, but not readable. +configExpandSuccess(sicReflect, null, {configExpand: 'rest', chmod: 0o622}); - // Fail if readable by others. - const expect = /is readable by non-owner users/; - configExpandFailure(sicReflect, expect, {configExpand: 'rest', chmod: 0o666}); - configExpandFailure(sicReflect, expect, {configExpand: 'rest', chmod: 0o644}); - configExpandFailure(sicReflect, expect, {configExpand: 'rest', chmod: 0o660}); - configExpandFailure(sicReflect, expect, {configExpand: 'rest', chmod: 0o606}); +// Fail if readable by others. +const expect = /is readable by non-owner users/; +configExpandFailure(sicReflect, expect, {configExpand: 'rest', chmod: 0o666}); +configExpandFailure(sicReflect, expect, {configExpand: 'rest', chmod: 0o644}); +configExpandFailure(sicReflect, expect, {configExpand: 'rest', chmod: 0o660}); +configExpandFailure(sicReflect, expect, {configExpand: 'rest', chmod: 0o606}); - web.stop(); +web.stop(); })(); |