diff options
author | Nate Potter <nathaniel.potteR@intel.com> | 2018-01-17 09:29:35 -0800 |
---|---|---|
committer | Nate Potter <nathaniel.potteR@intel.com> | 2018-01-18 06:01:07 -0800 |
commit | fdf88f32579d606cd82deadd3c89fac77b6aa472 (patch) | |
tree | ae120553c8eaf915e0383f194e2ec233a6c2b968 /bootstrap/vagrant-onap/tests | |
parent | 65759ac8168e02a91bdb1fa9de9b297feb61f362 (diff) |
Add kolla internal vip to no_proxy
The internal vip value is calculated at deploy time when
bringing up the OpenStack VM, and isn't able to be included
in the proxy values in the Vagrantfile. Because of this, we
need to add it to no_proxy after it's calculated so that users
and other services can access it in a proxy environment.
Signed-off-by: Nathaniel Potter <nathaniel.potter@intel.com>
Issue-ID: INT-383
Change-Id: Ifed792a4f7e6f4f5a227848486e8165be4a30fc7
Diffstat (limited to 'bootstrap/vagrant-onap/tests')
-rwxr-xr-x | bootstrap/vagrant-onap/tests/asserts | 10 | ||||
-rwxr-xr-x | bootstrap/vagrant-onap/tests/test_functions | 10 |
2 files changed, 19 insertions, 1 deletions
diff --git a/bootstrap/vagrant-onap/tests/asserts b/bootstrap/vagrant-onap/tests/asserts index 8eda3ce25..441b9f091 100755 --- a/bootstrap/vagrant-onap/tests/asserts +++ b/bootstrap/vagrant-onap/tests/asserts @@ -77,6 +77,16 @@ function asserts_file_exist { fi } +# asserts_env_set() - Function that verities that an environment variable is set +function asserts_env_set { + local variable=$1 + local error_msg=${2:-"$variable wasn't set"} + + if [ -z ${variable+x} ]; then + raise_error $error_msg + fi +} + # raise_error() - Function that prints and exits the execution function raise_error { echo $@ diff --git a/bootstrap/vagrant-onap/tests/test_functions b/bootstrap/vagrant-onap/tests/test_functions index 9411b46f4..dd482151f 100755 --- a/bootstrap/vagrant-onap/tests/test_functions +++ b/bootstrap/vagrant-onap/tests/test_functions @@ -8,7 +8,7 @@ covered_functions=( "configure_bind" "install_java" "install_maven" "install_nodejs" "install_python" "install_docker" "pull_docker_image" "install_docker_compose" "configure_service" "start_ODL" "compile_src" "build_docker_image" "docker_openecomp_login" -"pull_openecomp_image" "pull_onap_image" "coverity_repos" +"pull_openecomp_image" "pull_onap_image" "coverity_repos" "add_no_proxy_value" ) # test_create_configuration_files() - Verify the creation of a configuration files @@ -176,6 +176,14 @@ function test_coverity_repos { popd } +# test_add_no_proxy_value - Verify that the no_proxy value is correctly set +function test_add_no_proxy_value { + local ip="172.16.0.3" + add_no_proxy_value $ip + + asserts_env_set no_proxy +} + if [ "$1" != '*' ]; then unset covered_functions covered_functions=$1 |