diff options
author | Gary Wu <gary.i.wu@huawei.com> | 2018-01-20 03:04:40 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-01-20 03:04:40 +0000 |
commit | 8fa101a3dd2edf8e432b9447a886cfb583100fb0 (patch) | |
tree | 914ca872a6337fcbaff07ca1d2d437ffda0aa012 /bootstrap/vagrant-onap/tests/asserts | |
parent | 16038805de5da569592d3c951b3ca64973b0108a (diff) | |
parent | fdf88f32579d606cd82deadd3c89fac77b6aa472 (diff) |
Merge "Add kolla internal vip to no_proxy"
Diffstat (limited to 'bootstrap/vagrant-onap/tests/asserts')
-rwxr-xr-x | bootstrap/vagrant-onap/tests/asserts | 10 |
1 files changed, 10 insertions, 0 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 $@ |