phabstatus: add two more tests showing unhandled errors

Summary: These cause tracebacks; grepped out for readability.

Reviewed By: DurhamG

Differential Revision: D6826450

fbshipit-source-id: 4ea27f0f30cd9ab97710a234f5a451912ccc55c1
This commit is contained in:
Ryan McElroy 2018-02-07 01:53:48 -08:00 committed by Saurabh Singh
parent 389ac72c31
commit 8cb6affc20

View File

@ -39,6 +39,20 @@ And now with bad responses:
Error info: failed, yo
Error
$ cat > $TESTTMP/mockduit << EOF
> [{"data": {"query": [{"results": {"nodes": null}}]}}]
> EOF
$ HG_ARC_CONDUIT_MOCK=$TESTTMP/mockduit hg log -T '{phabstatus}\n' -r . 2>&1 | grep Error
AttributeError: 'NoneType' object has no attribute 'get'
$ cat > $TESTTMP/mockduit << EOF
> [{"data": {"query": [{"results": null}]}}]
> EOF
$ HG_ARC_CONDUIT_MOCK=$TESTTMP/mockduit hg log -T '{phabstatus}\n' -r . 2>&1 | grep Error
Error talking to phabricator. No diff information can be provided.
Error info: 'NoneType' object has no attribute '__getitem__'
Error
Missing status field is treated as an error
$ cat > $TESTTMP/mockduit << EOF
> [{"data": {"query": [{"results": {"nodes": [