84 Commits

Author SHA1 Message Date
Tony Breeds
7792bc39d4 Add new oslo.privsep library to oslo repos
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
2015-10-25 17:39:37 +11:00
Jenkins
6e9bee1ae5 Merge "Detect blank variable in trueorfalse" 2015-10-15 02:56:19 +00:00
Ian Wienand
e82bac0498 Detect blank variable in trueorfalse
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
2015-10-09 19:07:50 +11:00
Ian Wienand
ada886dd43 Don't mix declaration and set of locals
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
2015-10-07 17:03:32 +11:00
Chris Dent
e9a4750fe1 Remove ceilometer in favor of plugin
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
2015-09-09 16:44:29 +00:00
Jenkins
3f249b1e21 Merge "Support installing ironic-lib" 2015-09-01 18:21:00 +00:00
Jenkins
9f52d648fb Merge "Add file creation test" 2015-08-29 00:38:16 +00:00
Jenkins
a30a98099b Merge "Add -sudo option to ini setting options" 2015-08-27 22:15:30 +00:00
Dmitry Tantsur
869b72b851 Support installing ironic-lib
ironic-lib will soon become a dependency of ironic, make sure we can
write dsvm gates against it.

Change-Id: I6e66ae770cf5065980848e7e987bfd75765a5ac6
2015-08-26 17:34:46 +02:00
Jenkins
5cbd85738e Merge "Cleanup of ini test-case" 2015-07-27 20:43:50 +00:00
Jenkins
3805b3770c Merge "Allow installing keystoneauth from git" 2015-07-23 14:17:49 +00:00
Ian Wienand
cede787482 Add file creation test
Ensure that iniadd is creating files that don't exist, as it has
historically done.

Change-Id: I2798996f3d46ff1dce410b815a87395f1bf729f9
2015-07-23 06:46:24 +10:00
Ian Wienand
f44a024f02 Add -sudo option to ini setting options
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
2015-07-23 06:46:24 +10:00
Ian Wienand
b997db602e Cleanup of ini test-case
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
2015-07-23 06:46:24 +10:00
Jenkins
f0e86a7ac7 Merge "Add worlddump unit test" 2015-07-16 23:55:34 +00:00
Jamie Lennox
21a9077d7c Allow installing keystoneauth from git
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
2015-07-06 23:17:15 +00:00
Jenkins
fee742ba72 Merge "Move Sahara into in-tree plugin" 2015-07-02 18:39:38 +00:00
Sergey Lukjanov
3381e09f72 Move Sahara into in-tree plugin
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
2015-07-01 16:09:56 +00:00
Ian Wienand
5c7f39fdcd Add worlddump unit test
Add a worlddump unit test to avoid simple breakages

Change-Id: I6b87d4dbe22da2c1ca5ceb13134e9bb570f5cef2
2015-07-01 06:29:27 +10:00
Davanum Srinivas
77a7d11dfa Add new oslo libraries
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
2015-06-30 18:43:56 +00:00
Steve Martinelli
531017cf3e Add oslo.cache to devstack
as part of the graduation process, add oslo.cache to lib/oslo
and stackrc.

Change-Id: I2baf0384dd5d71d234a95b7acd0bfe5534f2732c
2015-06-27 15:10:51 +00:00
Davanum Srinivas
18d1cca6cb Add oslo.service to devstack
Add the ability to switch on oslo.service master using
LIBS_FROM_GIT

Change-Id: I00fe7776aea005b6d4e0a84fce54f33a862b57e3
2015-06-18 06:32:04 -04:00
Joshua Harlow
e3a640d573 Add futurist to lib/oslo and stackrc
Part of blueprint adopt-futurist

Change-Id: I17e27a085c7c509bad6018016e90d0114543b073
2015-06-10 11:57:41 -07:00
Joshua Harlow
96c6b2deb3 Add automaton to lib/oslo and stackrc
Part of blueprint adopt-automaton

Change-Id: I520643b74aced431f7a46b7d7b94616bb2e6bf8e
2015-06-10 11:48:50 -07:00
Ramy Asselin
10e1fd420d Allow override of os-brick library used by cinder
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
2015-06-08 09:54:16 -07:00
Ian Wienand
dd363a182f Cleanup test_ip.sh to give more consistent output
Minor changes to give more consistent output; no functional changes to
tests.

Change-Id: I6c4ef74587c59b786761735c7bd528f3d7f94905
2015-05-28 10:40:55 +10:00
Jenkins
cfdb6fa940 Merge "Add test case to 'cidr2netmask'" 2015-05-27 15:43:26 +00:00
Jenkins
3fa092bc1c Merge "Fix msg argument to assert_equal" 2015-05-27 15:43:21 +00:00
Mahito
d82d3f1340 Add test case to 'cidr2netmask'
'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
2015-05-26 15:33:32 +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
Ian Wienand
165afa2377 Fix msg argument to assert_equal
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
2015-05-25 11:29:48 +10:00
James E. Blair
9e220b9b2b Move trove into in-tree plugin
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
2015-05-14 07:57:23 -07:00
Mahito OGURA
98f59aafaf Fix function and test for 'trueorfalse'.
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
2015-05-11 18:23:07 +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
fa3e841286 Create config file in merge_config_file
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
2015-04-17 13:23: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
Ian Wienand
fcdca05de5 Fix return of test_ini_config & test_meta_config
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
2015-04-17 13:23:25 +10:00
Ian Wienand
f56348bcb2 Use unittest help in test_ip.sh
Use the unittest helper to track test runs and correctly exit with a
failure code if there is a problem

Change-Id: Ie62f354a8cd3b8fd5986e6943a073f7955fb55ba
2015-04-17 13:23:25 +10:00
Ian Wienand
1cb809d8ef Add "passed" and "failed" functions
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
2015-04-17 13:23:20 +10:00
Attila Fazekas
1bd79596c3 Move back isset to the functions-common
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
2015-03-26 14:00:02 +01:00
Dean Troyer
bf2ad7015d Move configuration functions into inc/*
* config/INI functions from functions-common to to inc/ini-config
* local.conf meta-config functions from lib/config to inc/meta-config

Change-Id: I00fab724075a693529273878875cfd292d00b18a
2015-03-09 22:52:19 -05:00
Dan Smith
aca8a7fd99 Add support for oslo.versionedobjects
Change-Id: I01dba39259a3b264d4ec2b21db8429d340751979
2015-03-03 08:50:27 -08:00
Joshua Harlow
ee9064b762 Add debtcollector to lib/oslo and stackrc
Ensure that the debtcollector library is pulled in
like the other oslo libraries so that devstack can
use it where appropriate.

Also fixes 'test_libs_from_pypi.sh' to not have a huge
single line of libraries; and splits it into multiple
lines so the diffs and code can be easily looked at.

Change-Id: I35ab0ed0e20b6092a41ecb3b6f1aaf0a05f5180e
2015-02-24 12:55:13 -08:00
Steve Martinelli
20b027b79c Add oslo.policy to lib/oslo and stackrc
As per the graduation work items, any new libraries should be
added to lib/oslo and stackrc

partially implements bp graduate-policy

Change-Id: Ief8f28715ecff5a602d6d840d736ea07b5e7ff39
2015-02-18 23:21:20 -05:00
gordon chung
ad61e7f9dd add ceilometermiddleware lib
middleware in ceilometer has been broken into it's own lib. this
first patch adds the package.

Change-Id: I63795787b909effcc4fcdee7f262207bb59fd8c2
2015-02-12 18:07:02 -05:00
Sean Dague
365421b99a isolate unit tests from stackrc HOST_IP check
The HOST_IP check in stackrc is useful for real users, but some cloud
nodes that infra runs don't detect it correctly, and it's not actually
required for unit tests to work right.

Change-Id: Id2aaa713aea91825021e9d8d49d19f3e40a8e6c9
2015-02-06 15:27:43 -05:00