[Testbox 2.1.0] - Redirect happens when running tests with routes enabled.

Hi All,

I am using the Tuckey URLrewrite filter and routes within ColdBox on Railo 4.2. I’ve found that if I try to run any integration tests that execute events that the test running gets redirected to something like index.cfm/version/index/version/index?propertiesfilename=TEST.properties&propertiessummary=false&directory=tests.specs&labels=&reportpath=/opt/jetty8/webapps/myapp/tests/results&recurse=true&reporter=simple&bundles=

Now in the Routes.cfm file if I change setEnabled to be false this no longer happens and tests execute as normal without the redirect happening. I’m wondering if I might have the urlrewrite filter incorrect or if this is expected behavior?

The contents of the urlrewrite.xml looks like:

<?xml version="1.0" encoding="utf-8"?> The rule means that requests to /test/status/ will be redirected to /rewrite-status the url will be rewritten. /test/status/ %{context-path}/rewrite-status Generic Pretty URLs Pass-through ^/(index.cfm|robots.txt|osd.xml|flex2gateway|cfide|cfformgateway|railo-context|admin-context|files|images|js|javascripts|css|styles|tests|testbox) \.(bmp|gif|jpe?g|png|css|js|txt|pdf|doc|xls|ico|otf|eot|svg|ttf|woff)$ ^/(.*)$ /index.cfm/$1 The outbound-rule specifies that when response.encodeURL is called (if you are using JSTL c:url) the url /rewrite-status will be rewritten to /test/status/.

The above rule and this outbound-rule means that end users should never see the
url /rewrite-status only /test/status/ both in thier location bar and in hyperlinks
in your pages.

/rewrite-status
/test/status/

Has anyone else run into this same issue? I don’t think I’m doing anything out of the ordinary here, so I’m not entirely sure why this redirect is happening. My fix for the time being is when I’m in my local environment add setEnabled(false). But I would like to see if there is a better way to handle this.

Thanks,

Ben