We wish to fail if we have >0 zero errors, not >1 errors (i.e. exactly
one error did not trigger a failure!)
This change also brings consistency to the pass & failure paths by
ensuring report_results exits in both cases, since report_results is
supposed to be the last thing run in a test file.
Change-Id: Id4721dffe13721e6c3cd71bca40c3395627e98bf
If local.conf specifies a config file addition in the following way...
[[post-config|$MY_CONF_FILE]]
[xyz]
foo=bar
...and $MY_CONF_FILE points to a file whose directory is not writable by
the user running the script, then stack.sh aborts with the following
obscure message:
2015-09-01 08:20:08.113 | touch: setting times of '/': Permission denied
This patch modifies inc/meta-config to provide a useful error message,
such as:
2015-09-01 08:20:08.114 | could not create config file / ($MY_CONF_FILE)
This patch also modifies inc/meta-config so that it provides an error
message if $MY_CONF_FILE is empty (instead of silently ignoring this local.conf
statement):
2015-09-01 09:38:53.406 | bogus config file specification: $MY_CONF_FILE
is undefined
Change-Id: I9b78407420318548561012a8672762bc7fdd6db6
Closes-Bug: 1490881
A new project olos.privsep has been created but failes sdvm testing as
even though the library is added ro PROJECTS and LIBS_FROM_GIT it isn't
installed by devstack.
Add oslo.privsep to the install_oslo function
Change-Id: Ia4d56747d56dcfe50889ebbdf9d553df13e1b950
As a follow-on to I8cefb58f49dcd2cb2def8a5071d0892af520e7f7, put in
some detection around missing variable-to-test arguments in
trueorfalse.
Correct a couple of places where we were passing in blank strings,
resulting in the default always being applied.
Add test-cases and enhance the documentation a little.
Depends-On: I8cefb58f49dcd2cb2def8a5071d0892af520e7f7
Change-Id: Icc0eb3808a2b6583828d8c47f0af4181e7e2c75a
Ia0957b47187c3dcadd46154b17022c4213781112 proposes to have bashate
find instances of setting a local value. The issue is that "local"
always returns 0, thus hiding any failure in the commands running to
set the variable.
This is an automated replacement of such instances
Depends-On: I676c805e8f0401f75cc5367eee83b3d880cdef81
Change-Id: I9c8912a8fd596535589b207d7fc553b9d951d3fe
The ceilometer project is moving to using a devstack plugin rather
than having ceilometer in the base devstack. This is to allow
greater control and flexibility.
Change-Id: I413ab159474b7d7231ad66d3a482201f74efe8a8
Add a -sudo option to allow these functions to operate on root-owned
files. Test-case is updated, but not enabled by default as we can't
expect test-runner to have sudo access.
Change-Id: I134c3397314c7d9395996eb6c825ecb7e7fdfc69
Various cleanup to this file.
Firstly create a temporary space to test, rather than working in the
source directory.
We have "assert_equal" which simplifies a lot. Add "assert_empty"
that is used in a couple of tests too. Remove a couple of duplicate
tests.
Change-Id: I7fd476ed63026e67d66a8ac2891b2e4a6687d09c
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
Keystoneauth is not marked as stable yet however to ensure that the
integration between it, keystoneclient and other services don't break
compatibility we want to test it with tempest.
Unfortunately you can't put -e links in requirements.txt files so add
it to devstack so we can set the test environment. This will also make
it available when keystoneauth is released.
Change-Id: I43ca1df9c6ae2f0ac1a687c9ce1e2ccb97e81652
Once the Sahara related code moved to Sahara repo and used, we can
remove Sahara specific code from Devstack.
Partial-Implements: bp sahara-devstack-intree
Change-Id: I34412b5cb2e86944b8555b8fd04b43556eb2bbe6
Depends-on: I2e00b2ebc59dd3be6a0539dea2985f2e801a1bd7
Depends-on: I07c3fede473030e8a110cbf5a08309f890905abf
Full list for liberty is as follows:
* oslo.service
* oslo.reports
* automaton
* futurist
oslo.cache was already added in the earlier review
Some of the entries are already there, though automaton was
missing in one spot. Made sure all references have all five
libraries.
Change-Id: Iffb720d46058424924469695a3ae1e4f20655f99
os-brick code was pulled out of cinder and made into its own library
https://review.openstack.org/#/c/155552/
added to requirements:
https://review.openstack.org/#/c/177372/
Integration tests were added
https://review.openstack.org/#/c/188156/
But they still use the version of os-brick from pip.
This change updates devstack to pull in the changes from
os-brick patch sets instead, when configured to do so.
Needed-by: Id2bc10782847861fe4bb5e9e46245654450e38fd
Change-Id: I5359dd37dfe94bd469d5ca35f9fbaeda61b5fac4
'cidr2netmask' of function doesn't have enough test case
and test code isn't smart.
This patch adds test case and refactors test code.
Change-Id: Iab20ef06fe78316a78198ab75c0afe738a577dd6
Closes-bug: #1457989
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
I noticed this was taking an argument but not dealing with it. In
general the functions were undocumented, so I added some terse usage.
Also, the intent of the test-case was to expand the values before
using them as the message; make sure this happens by using a temp
variable.
Change-Id: Ib317ad1e9dd2a5d2232b9c64541fe4a601a2b8da
Once the trove code is copied into the trove repo and it is used
as a devstack-plugin, we can remove trove-specific code from
devstack.
Change-Id: I8f9f1a015edb7ec1033e2eaf0b29ab15d89384ce
Depends-On: I3506dec0e6097f9c2e9267110fdfb768faa23c85
The function's comment is written as follow, however the function accepts
other values (ex. "e", "t", "T", "f", "F", etc...).
---
Accepts as False: 0 no No NO false False FALSE
Accepts as True: 1 yes Yes YES true True TRUE
---
Moreover if testval mach True or False, the function exits without resetting
xtrace.
This patch fixes the issue and add test patterns.
Change-Id: Ie48a859476faff22a4dfef466516e2d7d62ef0c0
Closes-bug: #1453687
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
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
Change If132a94e53545d9134859aa508da7b9819ede2f8 introduced a small
regression; it added an "inidelete" which looks in the config file to
delete rows.
However, at least for the test-case, the config file isn't created
yet. The end result is that the test fails but we don't notice.
2015-04-17 00:55:03.169 | merge_config_file test-multiline: sed: can't read test-multiline.conf: No such file or directory
2015-04-17 00:55:03.195 | OK
So fix this up by creating the config-file if it isn't there.
Also, add "-e" to the test file so we catch things like this in the
future.
Change-Id: I43a4ecc247f19cccf51d5931dfb687adbd23d6b1
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
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
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
Convert test_ini_config to use the "passed / failed" functions in
unittest.sh. test_meta_config wraps everything into a function; it's
not work unrolling this so just make sure it exits with non-zero if a
test fails.
Change-Id: I9e9883fdad42358255383eede9121b1d361799c8
Use the unittest helper to track test runs and correctly exit with a
failure code if there is a problem
Change-Id: Ie62f354a8cd3b8fd5986e6943a073f7955fb55ba
Add two generic "passed" and "failed" functions to the unittest
helper. Also keep a count of passed and failed tests. Later changes
will use these functions to ensure they exit with a correct return
code.
Change-Id: I8574dcb1447b04fcda3d72df0bf8605cf7488d3c
isset function was moved to config file related functions by accident,
this change also simplfies the isset in a bash >=4.2 way.
All supported distro has at least bash 4.2. (RHEL6 used 4.1)
Change-Id: Id644b46ff9cdbe18cde46e96aa72764e1c8653ac