container-openvpn/test/tests/paranoid/container.sh
Kyle Manna ee5d6a6b8a test: Start to migrate to docker's upstream tests
* Follow the upstream test suite's conventions.
* More migration to follow.
2016-08-31 11:39:36 -07:00

23 lines
434 B
Bash

#!/bin/bash
set -e
SERV_IP=$(ip -4 -o addr show scope global | awk '{print $4}' | sed -e 's:/.*::' | head -n1)
#
# Generate a simple configuration, returns nonzero on error
#
ovpn_genconfig -u udp://$SERV_IP 2>/dev/null
export EASYRSA_BATCH=1
export EASYRSA_REQ_CN="Travis-CI Test CA"
#
# Initialize the certificate PKI state, returns nonzero on error
#
ovpn_initpki nopass 2>/dev/null
#
# Test back-up
#
ovpn_copy_server_files