]>
Commit | Line | Data |
---|---|---|
1ca0323e | 1 | AT_BANNER([JSON-RPC - Python3]) |
99155935 | 2 | |
1ca0323e BP |
3 | AT_SETUP([JSON-RPC request and successful reply - Python3]) |
4 | AT_KEYWORDS([python jsonrpc]) | |
5 | AT_CHECK([$PYTHON3 $srcdir/test-jsonrpc.py --pidfile --detach --no-chdir listen punix:socket]) | |
6 | on_exit 'kill `cat test-jsonrpc.py.pid`' | |
7 | AT_CHECK( | |
8 | [[$PYTHON3 $srcdir/test-jsonrpc.py request unix:socket echo '[{"a": "b", "x": null}]']], [0], | |
9 | [[{"error":null,"id":0,"result":[{"a":"b","x":null}]} | |
56120500 | 10 | ]]) |
1ca0323e | 11 | AT_CLEANUP |
99155935 | 12 | |
1ca0323e BP |
13 | AT_SETUP([JSON-RPC request and error reply - Python3]) |
14 | AT_KEYWORDS([python jsonrpc]) | |
15 | AT_CHECK([$PYTHON3 $srcdir/test-jsonrpc.py --pidfile --detach --no-chdir listen punix:socket]) | |
16 | on_exit 'kill `cat test-jsonrpc.py.pid`' | |
17 | AT_CHECK( | |
18 | [[$PYTHON3 $srcdir/test-jsonrpc.py request unix:socket bad-request '[]']], [0], | |
19 | [[{"error":{"error":"unknown method"},"id":0,"result":null} | |
56120500 | 20 | ]]) |
1ca0323e | 21 | AT_CLEANUP |
58bed3df | 22 | |
1ca0323e BP |
23 | AT_SETUP([JSON-RPC notification - Python3]) |
24 | AT_KEYWORDS([python jsonrpc]) | |
25 | AT_CHECK([$PYTHON3 $srcdir/test-jsonrpc.py --pidfile --detach --no-chdir listen punix:socket]) | |
26 | on_exit 'kill `cat test-jsonrpc.py.pid`' | |
27 | AT_CHECK([test -e test-jsonrpc.py.pid]) | |
28 | AT_CHECK([[$PYTHON3 $srcdir/test-jsonrpc.py notify unix:socket shutdown '[]']]) | |
29 | # Wait for test-jsonrpc to die, based on its pidfile disappearing | |
30 | OVS_WAIT_WHILE([test -e test-jsonrpc.py.pid]) | |
31 | AT_CLEANUP |