qunit and jasmine urlpatterns should be defined only for test

Bug #1299188 reported by Akihiro Motoki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Won't Fix
Low
utsav dusad

Bug Description

qunit and jasmine urlpatterns are defined in horizon/site_urls.py if settings.DEBUG is True.
DEBUG=True is a valid situation without dev env (it is reasonable when testing).

It is better to use another flag other than DEBUG and define url_pattern "jasmine" and "qunit" only if the new flag is True.

Tags: unittest
Revision history for this message
Julie Pichon (jpichon) wrote :

I'm a bit wary of the proliferation of settings. When setting DEBUG to True, things like the mox dependency only kick in if specifically accessing the jasmine urls so the change is transparent to the user. I wonder what problem adding a new setting will help to solve?

Revision history for this message
Akihiro Motoki (amotoki) wrote :

My point is qunit an jasmine urls should not be accessable even when DEBUG is True. Setting DEBUG to True means qunit and jasmine urls are enabled and if it is not blocked a end-user can access the urls. Ideally such URLs are not defined unless it is a test setup. Am I missing something?

Revision history for this message
Akihiro Motoki (amotoki) wrote :

I totally forgot the reason why I noticed this bug. I am not sure this needs to be fixed or not.
Additional setting parameter sounds good to me.

tags: added: unittest
Changed in horizon:
importance: Undecided → Low
utsav dusad (utsavdusad)
Changed in horizon:
assignee: nobody → utsav dusad (utsavdusad)
Revision history for this message
Matt Borland (palecrow) wrote :

Not going to fix this.

Deployments shouldn't put tests in production, and regardless, you must expect some odd behavior if you place a production environment into DEBUG mode. This is also harmless behavior, so I'm not really worried about it.

Changed in horizon:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.