Apply bootstrap styles to the report template
Also add simple test to fix failing gate jobs Change-Id: I92b03072d06ea3220a5ba872c7541b8b7bd1401f
This commit is contained in:
parent
a6266bd2e6
commit
4dee0a89ad
4
.gitreview
Normal file
4
.gitreview
Normal file
@ -0,0 +1,4 @@
|
||||
[gerrit]
|
||||
host=review.openstack.org
|
||||
port=29418
|
||||
project=stackforge/shaker.git
|
@ -30,3 +30,9 @@ console_scripts =
|
||||
oslo.config.opts =
|
||||
shaker.openstack.common.log = shaker.openstack.common.log:list_opts
|
||||
shaker.engine.config = shaker.engine.config:list_opts
|
||||
|
||||
[build_sphinx]
|
||||
all_files = 1
|
||||
build-dir = doc/build
|
||||
source-dir = doc/source
|
||||
|
||||
|
@ -1,10 +1,24 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head lang="en">
|
||||
<meta charset="UTF-8">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Shaker report</title>
|
||||
|
||||
<!-- Latest compiled and minified CSS -->
|
||||
<link rel="stylesheet"
|
||||
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
|
||||
|
||||
<!-- Optional theme -->
|
||||
<link rel="stylesheet"
|
||||
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap-theme.min.css">
|
||||
|
||||
<!-- Latest compiled and minified JavaScript -->
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
|
||||
<h1>Report</h1>
|
||||
|
||||
@ -57,5 +71,6 @@
|
||||
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -41,9 +41,10 @@ def read_file(file_name):
|
||||
|
||||
|
||||
def split_address(address):
|
||||
host, port = address.split(':')
|
||||
if not port:
|
||||
raise Exception('Invalid address: %s', address)
|
||||
try:
|
||||
host, port = address.split(':')
|
||||
except ValueError:
|
||||
raise ValueError('Invalid address: %s, "host:port" expected', address)
|
||||
return host, port
|
||||
|
||||
|
||||
|
@ -6,5 +6,7 @@
|
||||
hacking>=0.8.0,<0.9
|
||||
mock>=1.0
|
||||
python-subunit>=0.0.18
|
||||
sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3
|
||||
sphinxcontrib-httpdomain
|
||||
testrepository>=0.0.18
|
||||
testtools>=0.9.36,!=1.2.0
|
||||
|
30
tests/test_utils.py
Normal file
30
tests/test_utils.py
Normal file
@ -0,0 +1,30 @@
|
||||
# Copyright (c) 2015 Mirantis Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
# implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import testtools
|
||||
|
||||
from shaker.engine import utils
|
||||
|
||||
|
||||
class TestUtils(testtools.TestCase):
|
||||
def setUp(self):
|
||||
super(TestUtils, self).setUp()
|
||||
|
||||
def test_split_address_valid(self):
|
||||
self.assertEqual(('10.0.0.1', '6777'),
|
||||
utils.split_address('10.0.0.1:6777'))
|
||||
|
||||
def test_split_address_invalid(self):
|
||||
self.assertRaises(ValueError, utils.split_address, 'erroneous')
|
5
tox.ini
5
tox.ini
@ -1,5 +1,5 @@
|
||||
[tox]
|
||||
envlist = py34,py27,pep8,bashate
|
||||
envlist = py34,py27,pep8,bashate,docs
|
||||
minversion = 1.6
|
||||
skipsdist = True
|
||||
|
||||
@ -37,6 +37,9 @@ commands =
|
||||
[tox:jenkins]
|
||||
downloadcache = ~/cache/pip
|
||||
|
||||
[testenv:docs]
|
||||
commands = python setup.py build_sphinx
|
||||
|
||||
[flake8]
|
||||
# E125 continuation line does not distinguish itself from next logical line
|
||||
ignore = E125
|
||||
|
Loading…
Reference in New Issue
Block a user