[TestBox 4.5.0] Integration Tests: event.getHTMLBaseURL() Appending /root/

I am creating some integration tests for a ColdBox REST API that generates static HTML files processed by wkhtmltopdf to convert them to PDFs. Everything works in production, but the tests fail to create PDF files because TestBox appends “/root/” to the value returned by event.getHTMLBaseURL(). I need to make sure event.getHTMLBaseURL() always returns the URL for the web root, even from within TestBox.

For example: <- TestBox: Returns 404 <- Production: returns 200 success!

Is there a way, within an integration test, to not append “/root/” to the path?

If you create a mapping in the regular application for /root does that resolve the issue?
Although, this interaction isn’t what I would expect.

I always thought we should have a convention for this, so it’s mirrored in the app and in testing. Sometimes its root, sometimes its cbapp.

I do have a /root mapping in the regular application. I believe this is from the boilerplate app template. It looks like this:

COLDBOX_APP_ROOT_PATH = getDirectoryFromPath( getCurrentTemplatePath() );
this.mappings[ "/root" ] = COLDBOX_APP_ROOT_PATH;

Even with that mapping, I get 404s when /root/ is appended to the URL. For example: <- 404 Not Found <- 200 Success

Or with static files: <- 404 Not found <- 200 Success