Yes I think it would be good to avoid the 404 page for any path within a tool that is deleted.
A few tests in the Allura and ForgeLink packages fail with this change. It looks like those tests and other code paths use update_mounts to install tools too, so that should be kept in mind - seems to function fine when I install a tool though.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Added fix to redirect root only when delete and regex mached with probject/mountpoint also
Btw. Can you advice how you run unit tests for selected module only ? Are you using python -m unittest discover ?
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The allura.tests.functional.test_admin:TestProjectAdmin.test_admin_controller test fails for me still. I think its because referrer can be None in tests. We do request.referer or ' in some places to avoid problems like this one.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks nosetests is good option for running only selected case. I did some fix and now no issues with above test. For all future fixes I will run nosetests before committing
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This fix skips 404 error when user at mount point exactly means that when user clicks "Delete Everything" on module which is going to be deleted.. when user delete from http://localhost:8080/p/allura/blog2/new it will display 404 but not delete from http://localhost:8080/p/allura/blog2/
Do we need to skip 404 from urls like http://localhost:8080/p/allura/blog2/new too?
Last edit: Shalitha Suranga 2018-10-02
Yes I think it would be good to avoid the 404 page for any path within a tool that is deleted.
A few tests in the Allura and ForgeLink packages fail with this change. It looks like those tests and other code paths use
update_mounts
to install tools too, so that should be kept in mind - seems to function fine when I install a tool though.Hi.. Dave
Added fix to redirect root only when delete and regex mached with probject/mountpoint also
Btw. Can you advice how you run unit tests for selected module only ? Are you using
python -m unittest discover
?Thanks
https://forge-allura.apache.org/docs/development/contributing.html#testing has some notes about testing. It doesn't mention it but you can also run tests for a single file like:
nosetests path/to/file.py
or for a single class or method like:nosetests some.package:TestClass.test_foo
The
allura.tests.functional.test_admin:TestProjectAdmin.test_admin_controller
test fails for me still. I think its because referrer can be None in tests. We dorequest.referer or '
in some places to avoid problems like this one.Hi.. Dave
Thanks nosetests is good option for running only selected case. I did some fix and now no issues with above test. For all future fixes I will run nosetests before committing