diff options
Diffstat (limited to 'tests/ovsdb-idl.at')
-rw-r--r-- | tests/ovsdb-idl.at | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/tests/ovsdb-idl.at b/tests/ovsdb-idl.at index d633dbb93..e57a3a468 100644 --- a/tests/ovsdb-idl.at +++ b/tests/ovsdb-idl.at @@ -1198,10 +1198,36 @@ m4_define([OVSDB_CHECK_IDL_NOTIFY_PY], OVSDB_SERVER_SHUTDOWN AT_CLEANUP]) +# This test uses the Python IDL implementation with ssl +m4_define([OVSDB_CHECK_IDL_NOTIFY_SSL_PY], + [AT_SETUP([$1 - SSL]) + AT_SKIP_IF([test $HAVE_PYTHON = no]) + $PYTHON -m OpenSSL.SSL + SSL_PRESENT=$? + AT_SKIP_IF([test $SSL_PRESENT != 0]) + AT_KEYWORDS([ovsdb server idl Python notify - ssl socket]) + AT_CHECK([ovsdb-tool create db $abs_srcdir/idltest.ovsschema], + [0], [stdout], [ignore]) + PKIDIR=$abs_top_builddir/tests + AT_CHECK([ovsdb-server --log-file '-vPATTERN:console:ovsdb-server|%c|%m' \ + --detach --no-chdir --pidfile="`pwd`"/pid \ + --private-key=$PKIDIR/testpki-privkey2.pem \ + --certificate=$PKIDIR/testpki-cert2.pem \ + --ca-cert=$PKIDIR/testpki-cacert.pem \ + --remote=pssl:0:127.0.0.1 --unixctl="`pwd`"/unixctl db], [0], [ignore], [ignore]) + PARSE_LISTENING_PORT([ovsdb-server.log], [TCP_PORT]) + AT_CHECK([$PYTHON $srcdir/test-ovsdb.py -t10 idl $srcdir/idltest.ovsschema \ + ssl:127.0.0.1:$TCP_PORT $PKIDIR/testpki-privkey.pem \ + $PKIDIR/testpki-cert.pem $PKIDIR/testpki-cacert.pem $2], + [0], [stdout], [ignore], [kill `cat pid`]) + AT_CHECK([sort stdout | ${PERL} $srcdir/uuidfilt.pl]m4_if([$5],,, [[| $5]]), + [0], [$3], [], [kill `cat pid`]) + OVSDB_SERVER_SHUTDOWN + AT_CLEANUP]) m4_define([OVSDB_CHECK_IDL_NOTIFY], - [OVSDB_CHECK_IDL_NOTIFY_PY($@)]) - + [OVSDB_CHECK_IDL_NOTIFY_PY($@) + OVSDB_CHECK_IDL_NOTIFY_SSL_PY($@)]) OVSDB_CHECK_IDL_NOTIFY([simple idl verify notify], [['track-notify' \ |