diff options
| author | Steve Martinelli <stevemar@ca.ibm.com> | 2014-11-12 16:11:37 -0500 |
|---|---|---|
| committer | Dean Troyer <dtroyer@gmail.com> | 2014-11-15 16:29:08 -0600 |
| commit | 126b2c543617866e9e1ea45ef9c5770ce5f5dda9 (patch) | |
| tree | f7b23f32a12d8bf81ff7e441322efb8242082e10 /functional/common | |
| parent | c55fdb6f6d1fc356ee03cf21fdf3d5b99418c921 (diff) | |
| download | python-openstackclient-126b2c543617866e9e1ea45ef9c5770ce5f5dda9.tar.gz | |
Add an API example base and functional test base
Add examples/common.py, which is a basic common setup that mimics OSC's
configuration options and logging without the rest of the CLI.
Also add the functional test tooling for examples to prevent bit rot.
Co-Authored-By: Dean Troyer <dtroyer@gmail.com>
Change-Id: Ie92b675eafd93482ddc9a8ce0b0588e23ed50c35
Diffstat (limited to 'functional/common')
| -rw-r--r-- | functional/common/test.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/functional/common/test.py b/functional/common/test.py index c1bb0b10..464844fa 100644 --- a/functional/common/test.py +++ b/functional/common/test.py @@ -10,6 +10,7 @@ # License for the specific language governing permissions and limitations # under the License. +import os import re import shlex import subprocess @@ -19,6 +20,11 @@ import six from functional.common import exceptions +COMMON_DIR = os.path.dirname(os.path.abspath(__file__)) +FUNCTIONAL_DIR = os.path.normpath(os.path.join(COMMON_DIR, '..')) +ROOT_DIR = os.path.normpath(os.path.join(FUNCTIONAL_DIR, '..')) +EXAMPLE_DIR = os.path.join(ROOT_DIR, 'examples') + def execute(cmd, action, flags='', params='', fail_ok=False, merge_stderr=False): |
