commit | deadc7c439f1126ba986b9c4f3c4d0b6d7774016 | [log] [tgz] |
---|---|---|
author | whoami-rajat <rajatdhasmana@gmail.com> | Thu Mar 14 11:01:18 2019 +0530 |
committer | whoami-rajat <rajatdhasmana@gmail.com> | Thu Mar 14 11:06:15 2019 +0530 |
tree | 24f0a59e972a7d8dd5c35228e9f28babc537affd | |
parent | 357afa971520fd4487c6e7bd2db2366b6c08f4c3 [diff] [blame] |
Fix : sort variables fetched from env list In bionic, when exporting env variables, the env list displays variables in unsorted format. While fetching we are getting 'https_proxy' before 'http_proxy' which is failing in comparison to our expected values[1]. This patch sorts the variables fetched from env. [1] http://logs.openstack.org/30/643130/3/check/devstack-unit-tests/effbf7a/job-output.txt.gz#_2019-03-13_23_12_35_465026 Change-Id: Ie504eabf0d3fec1b97bc711e2702c06bcf75d158
diff --git a/tests/test_functions.sh b/tests/test_functions.sh index adf20cd..08143d2 100755 --- a/tests/test_functions.sh +++ b/tests/test_functions.sh
@@ -272,7 +272,7 @@ export_proxy_variables expected=$(echo -e "http_proxy=$http_proxy\nhttps_proxy=$https_proxy\nno_proxy=$no_proxy") - results=$(env | egrep '(http(s)?|no)_proxy=') + results=$(env | egrep '(http(s)?|no)_proxy=' | sort) if [[ $expected = $results ]]; then passed "OK: Proxy variables are exported when proxy variables are set" else