Drop unnecessary executable flags
This patch also adds checks for executable files in pep8 job. nose ignores executable files by default, so it is important to ensure executable flag is not set for test files [1]. openstack_dashboard/test/test_plugins/panel_tests.py was not tested actually and it was broken. This commit fixes it too. [1] http://nose.readthedocs.io/en/latest/usage.html#cmdoption-exe Co-Authored-By: Ivan Kolodyazhny <e0ne@e0ne.info> Change-Id: I3a124fa2f9f0676b2b43a094e32e3d8b18fa6005
This commit is contained in:
parent
0b11ccb98f
commit
6c45c47e4b
0
openstack_dashboard/static/app/core/trunks/details/details.module.js
Executable file → Normal file
0
openstack_dashboard/static/app/core/trunks/details/details.module.js
Executable file → Normal file
0
openstack_dashboard/static/app/core/trunks/details/overview.controller.js
Executable file → Normal file
0
openstack_dashboard/static/app/core/trunks/details/overview.controller.js
Executable file → Normal file
0
openstack_dashboard/test/test_panels/plugin_panel/templates/plugin_panel/header.html
Executable file → Normal file
0
openstack_dashboard/test/test_panels/plugin_panel/templates/plugin_panel/header.html
Executable file → Normal file
0
openstack_dashboard/test/test_plugins/panel_config/_10_admin_add_panel.py
Executable file → Normal file
0
openstack_dashboard/test/test_plugins/panel_config/_10_admin_add_panel.py
Executable file → Normal file
|
@ -64,8 +64,9 @@ class PanelPluginTests(test.PluginTestCase):
|
|||
HORIZON_CONFIG['header_sections'])
|
||||
|
||||
def test_extensible_header(self):
|
||||
response = self.client.get('/header/')
|
||||
self.assertIn('sample context', response.content)
|
||||
with self.settings(ROOT_URLCONF=self.urls):
|
||||
response = self.client.get('/header/')
|
||||
self.assertIn('sample context', response.content.decode('utf-8'))
|
||||
|
||||
def test_remove_panel(self):
|
||||
dashboard = horizon.get_dashboard("admin")
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
./manage.py
|
||||
./tools/abandon_old_reviews.sh
|
||||
./tools/gate/integration/post_test_hook.sh
|
||||
./tools/gate/integration/pre_test_hook.sh
|
||||
./tools/unit_tests.sh
|
|
@ -0,0 +1,11 @@
|
|||
OUTPUT=`find . \( -name .tox -o -name .git \) -prune -o -type f -perm /a=x -print \
|
||||
| grep -v -F -f ./tools/executable_files.txt`
|
||||
if [ -n "$OUTPUT" ]; then
|
||||
echo "Unexpected executable files are found:"
|
||||
for f in $OUTPUT; do
|
||||
echo $f
|
||||
done
|
||||
echo
|
||||
echo "If you really need to add an executable file, add it to tools/executable_files.txt"
|
||||
exit 1
|
||||
fi
|
3
tox.ini
3
tox.ini
|
@ -66,8 +66,9 @@ commands =
|
|||
|
||||
[testenv:pep8]
|
||||
commands =
|
||||
{envpython} {toxinidir}/manage.py extract_messages --verbosity 0 --check-only
|
||||
flake8 {posargs}
|
||||
{envpython} {toxinidir}/manage.py extract_messages --verbosity 0 --check-only
|
||||
bash {toxinidir}/tools/find_executables.sh
|
||||
|
||||
[testenv:cover]
|
||||
commands =
|
||||
|
|
Loading…
Reference in New Issue