Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Users

Catalyst::Test configuration questions

 

 

Catalyst users RSS feed   Index | Next | Previous | View Threaded


lists at evancarroll

Oct 26, 2009, 2:51 PM

Post #1 of 5 (355 views)
Permalink
Catalyst::Test configuration questions

My latest project, a Craigslist posting tool, is configured through
the applications yaml conf file. I'm looking for a way to test based
the conf file with Catalyst::Test. Any idea of how to accomplish this?

--
Evan Carroll
System Lord of the Internets

_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


devin.austin at gmail

Oct 26, 2009, 2:54 PM

Post #2 of 5 (333 views)
Permalink
Re: Catalyst::Test configuration questions [In reply to]

On Mon, Oct 26, 2009 at 3:51 PM, Evan Carroll <lists[at]evancarroll.com> wrote:

> My latest project, a Craigslist posting tool, is configured through
> the applications yaml conf file. I'm looking for a way to test based
> the conf file with Catalyst::Test. Any idea of how to accomplish this?
>
> --
> Evan Carroll
> System Lord of the Internets
>
> _______________________________________________
> List: Catalyst[at]lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>

So, you want your tests to be configured based on a yaml config file? Or you
want to base your tests off of a yaml config file?

--
Devin Austin
http://www.codedright.net
9702906669 - Cell


andrew at cleverdomain

Oct 26, 2009, 3:02 PM

Post #3 of 5 (333 views)
Permalink
Re: Catalyst::Test configuration questions [In reply to]

On Monday 26 October 2009 04:51:57 pm Evan Carroll wrote:
> My latest project, a Craigslist posting tool, is configured through
> the applications yaml conf file. I'm looking for a way to test based
> the conf file with Catalyst::Test. Any idea of how to accomplish this?
>
You're gonna need some
http://dl.getdropbox.com/u/129905/specialized-hardware.jpg for that.

Andrew

_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


lists at evancarroll

Oct 26, 2009, 3:17 PM

Post #4 of 5 (335 views)
Permalink
Re: Catalyst::Test configuration questions [In reply to]

> So, you want your tests to be configured based on a yaml config file? Or you
> want to base your tests off of a yaml config file?

I'm not sure there is a difference as you word it.

I want to dynamically modify the configuration of my application for
the purpose of testing. That configuration is loaded from a yaml. I'm
unsure of how to to load a different yaml-conf for the purpose of
testing alternate configurations, or of how to best manipulate the
configuration of my app after the load to simulate a test in a
different environments then the default.

http://github.com/EvanCarroll/Craiglickr/blob/master/craiglickr.yaml

Craiglickr:
location:
cross_posting: 1
cross_metro: 0
max: 4
category:
cross_posting: 0


I want to test different settings such as if cross_metro was set to 1,
or of cross_posting was set to 0, and such.

--
Evan Carroll
System Lord of the Internets
http://www.evancarroll.com

_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


lists at eightdegrees

Oct 26, 2009, 3:29 PM

Post #5 of 5 (335 views)
Permalink
Re: Catalyst::Test configuration questions [In reply to]

On Tue, Oct 27, 2009 at 8:17 AM, Evan Carroll <lists[at]evancarroll.com> wrote:

> I want to dynamically modify the configuration of my application for
> the purpose of testing. That configuration is loaded from a yaml. I'm
> unsure of how to to load a different yaml-conf for the purpose of
> testing alternate configurations, or of how to best manipulate the
> configuration of my app after the load to simulate a test in a
> different environments then the default.
>
>
http://search.cpan.org/~bricas/Catalyst-Plugin-ConfigLoader-0.27/lib/Catalyst/Plugin/ConfigLoader.pm

get_config_local_suffix<http://search.cpan.org/%7Ebricas/Catalyst-Plugin-ConfigLoader-0.27/lib/Catalyst/Plugin/ConfigLoader.pm#___top>

Determines the suffix of files used to override the main config. By default
this value is local, which will load myapp_local.conf. The suffix can be
specified in the following order of preference:

- $ENV{ MYAPP_CONFIG_LOCAL_SUFFIX }
- $ENV{ CATALYST_CONFIG_LOCAL_SUFFIX }
- $c->config->{ 'Plugin::ConfigLoader' }->{ config_local_suffix }

The first one of these values found replaces the default of local in the
name of the local config file to be loaded.

For example, if $ENV{ MYAPP_CONFIG_LOCAL_SUFFIX } is set to testing,
ConfigLoader will try and load myapp_testing.conf instead of
myapp_local.conf.
cheers,

J


--
Jason Galea
Web Developer

Ph 07 40556926
Mob 04 12345 534
www.eightdegrees.com.au

Catalyst users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.