summaryrefslogtreecommitdiff
path: root/jstests/noPassthrough/libs/configExpand
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/noPassthrough/libs/configExpand')
-rw-r--r--jstests/noPassthrough/libs/configExpand/reflect.py5
-rw-r--r--jstests/noPassthrough/libs/configExpand/rest_server.py3
2 files changed, 7 insertions, 1 deletions
diff --git a/jstests/noPassthrough/libs/configExpand/reflect.py b/jstests/noPassthrough/libs/configExpand/reflect.py
index d4e0f9a88d4..2852e3d1355 100644
--- a/jstests/noPassthrough/libs/configExpand/reflect.py
+++ b/jstests/noPassthrough/libs/configExpand/reflect.py
@@ -7,11 +7,13 @@ import argparse
import sys
import time
+
def main():
"""Main Method."""
parser = argparse.ArgumentParser(description='MongoDB Mock Config Expandsion EXEC Endpoint.')
- parser.add_argument('-s', '--sleep', type=int, default=0, help="Add artificial delay for timeout testing")
+ parser.add_argument('-s', '--sleep', type=int, default=0,
+ help="Add artificial delay for timeout testing")
parser.add_argument('value', type=str, help="Content to reflect to stdout")
args = parser.parse_args()
@@ -25,5 +27,6 @@ def main():
sys.stdout.write(args.value)
+
if __name__ == '__main__':
main()
diff --git a/jstests/noPassthrough/libs/configExpand/rest_server.py b/jstests/noPassthrough/libs/configExpand/rest_server.py
index 9e30deb2c12..f1704e8fe77 100644
--- a/jstests/noPassthrough/libs/configExpand/rest_server.py
+++ b/jstests/noPassthrough/libs/configExpand/rest_server.py
@@ -10,6 +10,7 @@ import urllib.parse
connect_count = 0
+
class ConfigExpandRestHandler(http.server.BaseHTTPRequestHandler):
"""
Handle requests from mongod during config expansion.
@@ -73,6 +74,7 @@ class ConfigExpandRestHandler(http.server.BaseHTTPRequestHandler):
self.end_headers()
self.wfile.write('POST not supported')
+
def run(port):
"""Run web server."""
@@ -83,6 +85,7 @@ def run(port):
print("Mock Web Server Listening on %s" % (str(server_address)))
httpd.serve_forever()
+
def main():
"""Main Method."""