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
doc/source/contributor/tutorials/plugin.rst
Executable file → Normal file
0
doc/source/contributor/tutorials/plugin.rst
Executable file → Normal file
0
horizon/static/horizon/js/horizon.extensible_header.js
Executable file → Normal file
0
horizon/static/horizon/js/horizon.extensible_header.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/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/static/app/core/trunks/details/overview.html
Executable file → Normal file
0
openstack_dashboard/static/app/core/trunks/details/overview.html
Executable file → Normal file
0
openstack_dashboard/static/dashboard/scss/components/_navbar.scss
Executable file → Normal file
0
openstack_dashboard/static/dashboard/scss/components/_navbar.scss
Executable file → Normal file
0
openstack_dashboard/templates/header/_header.html
Executable file → Normal file
0
openstack_dashboard/templates/header/_header.html
Executable file → Normal file
0
openstack_dashboard/templates/header/_header_sections.html
Executable file → Normal file
0
openstack_dashboard/templates/header/_header_sections.html
Executable file → Normal file
0
openstack_dashboard/templates/horizon/_scripts.html
Executable file → Normal file
0
openstack_dashboard/templates/horizon/_scripts.html
Executable file → Normal file
0
openstack_dashboard/test/extensible_header_urls.py
Executable file → Normal file
0
openstack_dashboard/test/extensible_header_urls.py
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_panels/plugin_panel/views.py
Executable file → Normal file
0
openstack_dashboard/test/test_panels/plugin_panel/views.py
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
3
openstack_dashboard/test/test_plugins/panel_tests.py
Executable file → Normal file
3
openstack_dashboard/test/test_plugins/panel_tests.py
Executable file → Normal file
@ -64,8 +64,9 @@ class PanelPluginTests(test.PluginTestCase):
|
||||
HORIZON_CONFIG['header_sections'])
|
||||
|
||||
def test_extensible_header(self):
|
||||
with self.settings(ROOT_URLCONF=self.urls):
|
||||
response = self.client.get('/header/')
|
||||
self.assertIn('sample context', response.content)
|
||||
self.assertIn('sample context', response.content.decode('utf-8'))
|
||||
|
||||
def test_remove_panel(self):
|
||||
dashboard = horizon.get_dashboard("admin")
|
||||
|
0
openstack_dashboard/themes/material/templates/header/_header.html
Executable file → Normal file
0
openstack_dashboard/themes/material/templates/header/_header.html
Executable file → Normal file
0
openstack_dashboard/urls.py
Executable file → Normal file
0
openstack_dashboard/urls.py
Executable file → Normal file
0
openstack_dashboard/utils/settings.py
Executable file → Normal file
0
openstack_dashboard/utils/settings.py
Executable file → Normal file
0
openstack_dashboard/views.py
Executable file → Normal file
0
openstack_dashboard/views.py
Executable file → Normal file
5
tools/executable_files.txt
Normal file
5
tools/executable_files.txt
Normal file
@ -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
|
11
tools/find_executables.sh
Normal file
11
tools/find_executables.sh
Normal file
@ -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
Block a user