Commit 6699be34 authored by kaliamoorthi's avatar kaliamoorthi Committed by Commit bot

Add a mechanism for python test server to exit

This CL adds a mechanism which can be used to make the python test server exit.

BUG=417684

Review URL: https://codereview.chromium.org/607823002

Cr-Commit-Position: refs/heads/master@{#296920}
parent 38bfd7dc
......@@ -229,6 +229,13 @@ class PolicyRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
path = self.path if sep == -1 else self.path[:sep]
if path == '/externalpolicydata':
http_response, raw_reply = self.HandleExternalPolicyDataRequest()
elif path == '/configuration/test/exit':
# This is not part of the standard DM server protocol.
# This extension is added to make the test server exit gracefully
# when the test is complete.
self.server.stop = True
http_response = 200
raw_reply = 'OK'
else:
http_response = 404
raw_reply = 'Invalid path'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment