tests: Complain if key and certs not provided for SSL connection
Add an argument check to test-ovsdb.py to ensure that the user has
provided the private key, the certificate, and the peer CA certificate
needed to set up an SSL connection.
@@ -552,6 +552,11 @@ def do_idl(schema_file, remote, *commands):
track_notify = False
if remote.startswith("ssl:"):
+ if len(commands) < 3:
+ sys.stderr.write("SSL connection requires private key, "
+ "certificate for private key, and peer CA "
+ "certificate as arguments\n")
+ sys.exit(1)
ovs.stream.Stream.ssl_set_private_key_file(commands[0])
ovs.stream.Stream.ssl_set_certificate_file(commands[1])
ovs.stream.Stream.ssl_set_ca_cert_file(commands[2])
