Changeset 4fe52e6 in mod_gnutls for test/mgstest
- Timestamp:
- Jan 23, 2020, 8:02:50 AM (13 months ago)
- Branches:
- asyncio, master, proxy-ticket
- Children:
- 4f2c988
- Parents:
- f94938c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/mgstest/tests.py
rf94938c r4fe52e6 180 180 elif type(act) is TestReq10: 181 181 act.run(command, timeout, conn_log, response_log) 182 elif type(act) is Resume: 183 act.run(conn, command) 182 184 else: 183 185 raise TypeError(f'Unsupported action requested: {act!r}') … … 424 426 425 427 428 class Resume(yaml.YAMLObject): 429 """Test action to close and resume the TLS session. 430 431 Send the gnutls-cli inline command "^resume^" to close and resume 432 the TLS session. "inline-commands" must be present in 433 gnutls_params of the parent connection. This action does not need 434 any arguments, but you must specify with an explicitly empty 435 dictionary for YAML parsing to work, like this: 436 437 !resume {} 438 439 """ 440 yaml_tag = '!resume' 441 def run(self, conn, command): 442 if not '--inline-commands' in command: 443 raise ValueError('gnutls_params must include "inline-commands" ' 444 'to use the resume action!') 445 if not type(conn) is HTTPSubprocessConnection: 446 raise TypeError('Resume action works only with ' 447 'HTTPSubprocessConnection.') 448 conn.sock.send(b'^resume^\n') 449 450 451 426 452 def filter_cert_log(in_stream, out_stream): 427 453 """Filter to stop an erroneous gnutls-cli log message.
Note: See TracChangeset
for help on using the changeset viewer.