9 Commits

Author SHA1 Message Date
Mahito OGURA
54dc19ecad Add export_proxy_variables() tests to test_functions.sh
In test_functions.sh, There aren't export_proxy_variables() tests.
This patch add test of export_proxy_variables to test_funstions.sh.

Change-Id: I76f2bab84f4019961e612b0bff0ab66646b6e160
2015-07-15 23:31:51 +09:00
fumihiko kakuma
8606c98c53 Fix remove_disabled_extensions to remove an extension at the last position
remove_disabled_extensions do matching by '$ext_to_remove","'. So it doesn't
match an extension at the last position in extensions_list.
This patch fixes that.

Closes-Bug: #1443254
Change-Id: I194b483de797697ba06b320cf33f1bac67fc0cc7
2015-05-26 12:38:35 +09:00
Jenkins
641dd9ff23 Merge "Fix negated services with common prefix" 2015-05-07 02:48:20 +00:00
Sean Dague
7efba991f7 don't source openrc
There is actually no reason why we need openrc for these tests, don't
source it as it prevents some ip math errors from randomly killing
tests.

Change-Id: Iface7c21898d92e14e840379938b25844cd85565
2015-04-28 13:15:22 -04:00
Ian Wienand
2796a82ab4 Fix negated services with common prefix
The current sed matching mixes up common-prefix matching;
e.g. "-q-lbaas,q-lbaasv2" is changed into just "v2"

This is more verbose, but I think more reliable.  See also
Ib50f782824f89ae4eb9787f11d42416704babd90.

Change-Id: I3faad0841834e24acc811c05015625cf7f848b19
2015-04-23 15:10:25 +10:00
Ian Wienand
09f4ad2279 Convert test_functions.sh to use unittest helpers
This currently does not exit with any failure code when tests are
failing.  Convert it to use the helper functions from unittest.sh so
it correctly reports failures.

Change-Id: I2062d9c00ebffcc98ba75a12f480e4dd728ee080
2015-04-17 13:23:25 +10:00
Ian Wienand
9b845da478 Fix die_if_not_set tests
The "die_if_not_set" test has the LINENO as a positional argument.
The existing tests are not passing this in, so they are failing.

Along with this, remove the "-x" from the invocation and hide the
output of the tests that are expected to fail to avoid confusion.

Change-Id: Ibf6b9d7bb72b9f92831e1a90292ff8b0bec7faea
2015-04-17 13:23:25 +10:00
Ian Wienand
9b0ebc44f4 Move function.sh to test_functions.sh
run_tests.sh runs tests starting with test_*

The existing test_functions.sh is really testing true/false.  Move
that to test_truefalse.sh

Then move functions.sh to test_functions.sh.  This will ensure it is
run during unit testing from run-tests.sh

Change-Id: I959ac38c946da1fb47458b8c4f09157f74f0e644
2015-04-17 13:23:25 +10:00
Sean Dague
537532931d Make changes such that -o nounset runs
This makes a bunch of variable cleanups that will let -o nounset
function, for the time being we hide nounset behind another setting
variable so that it's not on by default.

Because this is bash, and things are only executed on demand, this
probably only works in the config it was run in. Expect cleaning up
all the paths to be something that takes quite a while.

This also includes a new set of unit tests around the trueorfalse
function, because my change in how it worked, didn't. Tests are good
m'kay.

Change-Id: I71a896623ea9e1f042a73dc0678ce85acf0dc87d
2015-01-15 13:06:14 -05:00