Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Reload a Catalyst application during testing

by Your Mother (Archbishop)
on May 09, 2019 at 17:41 UTC ( [id://1233519]=note: print w/replies, xml ) Need Help??


in reply to Reload a Catalyst application during testing

I believe Catalyst forbids/ignores live app config changes (sidenote: this has nothing to with model data, just $ctx->config stuff) after ->setup is run. There are probably some hacky re->import(…)/unload things you could try but I don’t think it’s a good idea.

So, for “what goes here?” the easy and clear answer is a new test file with something like local $ENV{CATALYST_CONFIG_LOCAL_SUFFIX} = "other_test" at the top matching your new test config. If you use a PSGI test runner or something instead of the built-in test lib you could probably do this more easily in one test file, in blocks or subtests, but it doesn’t seem like it’s as transparent or a big gain over two test files.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1233519]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-04-19 16:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found