Rename Humbug-based variables in check-mirroring.
(imported from commit cdfc9a1c15db7bd6de099e6403dc65bfaff337b0)
This commit is contained in:
parent
bd133f6bd4
commit
a9e8d1a2a2
|
@ -34,12 +34,12 @@ sys.path[:0] = [os.path.join(options.root_path, "api/"),
|
||||||
options.root_path]
|
options.root_path]
|
||||||
|
|
||||||
mit_user = 'tabbott/extra@ATHENA.MIT.EDU'
|
mit_user = 'tabbott/extra@ATHENA.MIT.EDU'
|
||||||
humbug_user = 'tabbott/extra@mit.edu'
|
zulip_user = 'tabbott/extra@mit.edu'
|
||||||
|
|
||||||
sys.path.append(".")
|
sys.path.append(".")
|
||||||
import zulip
|
import zulip
|
||||||
zulip_client = zulip.Client(
|
zulip_client = zulip.Client(
|
||||||
email=humbug_user,
|
email=zulip_user,
|
||||||
api_key="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
|
api_key="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
|
||||||
verbose=True,
|
verbose=True,
|
||||||
client="test: Humbug API",
|
client="test: Humbug API",
|
||||||
|
@ -60,7 +60,7 @@ logger.addHandler(file_handler)
|
||||||
|
|
||||||
# Initialize list of streams to test
|
# Initialize list of streams to test
|
||||||
if options.sharded:
|
if options.sharded:
|
||||||
# NOTE: Streams in this list must be in humbug_user's Zulip
|
# NOTE: Streams in this list must be in zulip_user's Zulip
|
||||||
# subscriptions, or we won't receive messages via Zulip.
|
# subscriptions, or we won't receive messages via Zulip.
|
||||||
|
|
||||||
# The sharded stream list has a bunch of pairs
|
# The sharded stream list has a bunch of pairs
|
||||||
|
@ -102,7 +102,7 @@ def print_status_and_exit(status):
|
||||||
print status
|
print status
|
||||||
sys.exit(status)
|
sys.exit(status)
|
||||||
|
|
||||||
def send_humbug(message):
|
def send_zulip(message):
|
||||||
result = zulip_client.send_message(message)
|
result = zulip_client.send_message(message)
|
||||||
if result["result"] != "success":
|
if result["result"] != "success":
|
||||||
logger.error("Error sending zulip, args were:")
|
logger.error("Error sending zulip, args were:")
|
||||||
|
@ -237,13 +237,13 @@ logger.info("Sent Zephyr messages!")
|
||||||
# Send Zulips
|
# Send Zulips
|
||||||
for key, (stream, test) in hzkeys.items():
|
for key, (stream, test) in hzkeys.items():
|
||||||
if stream == "message":
|
if stream == "message":
|
||||||
send_humbug({
|
send_zulip({
|
||||||
"type": "private",
|
"type": "private",
|
||||||
"content": str(key),
|
"content": str(key),
|
||||||
"to": humbug_user,
|
"to": zulip_user,
|
||||||
})
|
})
|
||||||
else:
|
else:
|
||||||
send_humbug({
|
send_zulip({
|
||||||
"type": "stream",
|
"type": "stream",
|
||||||
"subject": "test",
|
"subject": "test",
|
||||||
"content": str(key),
|
"content": str(key),
|
||||||
|
|
Loading…
Reference in a new issue