source: mod_gnutls/test/test-16_view-status.bash @ 05984a0

proxy-ticket
Last change on this file since 05984a0 was 05984a0, checked in by Fiona Klute <fiona.klute@…>, 7 months ago

Replace "runtests" with "runtest.py"

This is the next step from handling HTTP requests and responses in
Python. In particular error handling is a lot easier to do in Python
than using Bash trap functions.

  • Property mode set to 100755
File size: 796 bytes
Line 
1#!/bin/bash
2set -e
3
4# expected output files
5log="outputs/16_view-status.log"
6output="outputs/16_view-status.output"
7
8${srcdir}/netns_py.bash ${srcdir}/runtest.py --test-number 16 \
9         --log-connection "${log}" --log-responses "${output}"
10
11# get the cipher suite reported by gnutls-cli
12cli_suite="$(grep -o -P '(?<=^-\sDescription:\s).*$' "${log}")" || true
13# extract cipher suite from the server status output
14status_suite="$(grep -o -P '(?<=^Current TLS session:\s).*$' "${output}")" \
15    || true
16
17echo
18if [[ -n "${cli_suite}" && "${status_suite}" = "${cli_suite}" ]]; then
19    echo "Server and client report matching cipher suite: ${status_suite}"
20else
21    echo "ERROR: Cipher suites mismatching or missing!"
22    echo "Server: '${status_suite}'"
23    echo "Client: '${cli_suite}'"
24    exit 1
25fi
Note: See TracBrowser for help on using the repository browser.