You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Neil McT <ne...@yahoo.co.uk> on 2008/09/18 19:21:48 UTC

Turning off SWARM for testing?

Is there any way to turn-off / circumvent SWARM for testing?

I'm using WicketTester and any time I attempt to navigate to a protected
page (i.e. implements ISecurePage) I get bounced back to my login-page.
 
I'd prefer not to have to go to the lengths of 'logging in' a user, just for
tests as I'd prefer my unit tests to be as focussed as possible.

Any help much appreciated.

Neil.
-- 
View this message in context: http://www.nabble.com/Turning-off-SWARM-for-testing--tp19557765p19557765.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Turning off SWARM for testing?

Posted by Igor Vaynberg <ig...@gmail.com>.
thats why we have packages :)

-igor

On Thu, Sep 18, 2008 at 11:37 AM, James Carman
<ja...@carmanconsulting.com> wrote:
> Well, coming from a member of the Apache HiveMind PMC, that's confusing.
>
> On Thu, Sep 18, 2008 at 2:30 PM, Hoover, William <wh...@nemours.org> wrote:
>> Yeah, really :) the param name in the register method is for the hive
>> key is "queen"... hmmm... I wonder if any exceptions refer to you
>> getting stung
>>
>> -----Original Message-----
>> From: jcarman@carmanconsulting.com [mailto:jcarman@carmanconsulting.com]
>> On Behalf Of James Carman
>> Sent: Thursday, September 18, 2008 2:24 PM
>> To: users@wicket.apache.org
>> Subject: Re: Turning off SWARM for testing?
>>
>> Way to poach a name! :)
>>
>> On Thu, Sep 18, 2008 at 2:17 PM, Hoover, William <wh...@nemours.org>
>> wrote:
>>> Yes, the same org.apache.wicket.security.hive.HiveMind used to
>>> HiveMind.registerHive(getHiveKey(), factory) the factory in
>>> SwarmWebApplication#setUpHive()
>>>
>>> -----Original Message-----
>>> From: jcarman@carmanconsulting.com
>>> [mailto:jcarman@carmanconsulting.com]
>>> On Behalf Of James Carman
>>> Sent: Thursday, September 18, 2008 2:07 PM
>>> To: users@wicket.apache.org
>>> Subject: Re: Turning off SWARM for testing?
>>>
>>> HiveMind?
>>>
>>> On Thu, Sep 18, 2008 at 2:03 PM, Hoover, William <wh...@nemours.org>
>>> wrote:
>>>> Try HiveMind.unregisterHive(hiveKey);
>>>>
>>>> -----Original Message-----
>>>> From: Igor Vaynberg [mailto:igor.vaynberg@gmail.com]
>>>> Sent: Thursday, September 18, 2008 1:56 PM
>>>> To: users@wicket.apache.org
>>>> Subject: Re: Turning off SWARM for testing?
>>>>
>>>> sorry, i dont know anything about swarm itself. maybe during test you
>>
>>>> override setuphive() and give it a policy that allows everything and
>>>> does not require a login.
>>>>
>>>> -igor
>>>>
>>>> On Thu, Sep 18, 2008 at 10:45 AM, Neil McT
>>>> <ne...@yahoo.co.uk>
>>>> wrote:
>>>>>
>>>>> Sorry not sure what you mean by 'swarm auth strategy'
>>>>>
>>>>> My application class extends SwarmWebApplication and the only SWARM
>>>>> specific methods it overrides are getHiveKey() and setUpHive() -
>>>>> where
>>>>
>>>>> I add the policy file. Is it one of these that I should be 'nulling
>>>> out' for testing?
>>>>>
>>>>> Thanks.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> igor.vaynberg wrote:
>>>>>>
>>>>>> have an overrideable method on your application boolean
>>>>>> issecurityenabled(), and only add swarm auth strategy if it returns
>>
>>>>>> true. that way during tests you can give tester a subclass of your
>>>>>> app that returns false.
>>>>>>
>>>>>> -igor
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/Turning-off-SWARM-for-testing--tp19557765p1955
>>>>> 8
>>>>> 1 53.html Sent from the Wicket - User mailing list archive at
>>>>> Nabble.com.
>>>>>
>>>>>
>>>>> --------------------------------------------------------------------
>>>>> - To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Turning off SWARM for testing?

Posted by James Carman <ja...@carmanconsulting.com>.
Well, coming from a member of the Apache HiveMind PMC, that's confusing.

On Thu, Sep 18, 2008 at 2:30 PM, Hoover, William <wh...@nemours.org> wrote:
> Yeah, really :) the param name in the register method is for the hive
> key is "queen"... hmmm... I wonder if any exceptions refer to you
> getting stung
>
> -----Original Message-----
> From: jcarman@carmanconsulting.com [mailto:jcarman@carmanconsulting.com]
> On Behalf Of James Carman
> Sent: Thursday, September 18, 2008 2:24 PM
> To: users@wicket.apache.org
> Subject: Re: Turning off SWARM for testing?
>
> Way to poach a name! :)
>
> On Thu, Sep 18, 2008 at 2:17 PM, Hoover, William <wh...@nemours.org>
> wrote:
>> Yes, the same org.apache.wicket.security.hive.HiveMind used to
>> HiveMind.registerHive(getHiveKey(), factory) the factory in
>> SwarmWebApplication#setUpHive()
>>
>> -----Original Message-----
>> From: jcarman@carmanconsulting.com
>> [mailto:jcarman@carmanconsulting.com]
>> On Behalf Of James Carman
>> Sent: Thursday, September 18, 2008 2:07 PM
>> To: users@wicket.apache.org
>> Subject: Re: Turning off SWARM for testing?
>>
>> HiveMind?
>>
>> On Thu, Sep 18, 2008 at 2:03 PM, Hoover, William <wh...@nemours.org>
>> wrote:
>>> Try HiveMind.unregisterHive(hiveKey);
>>>
>>> -----Original Message-----
>>> From: Igor Vaynberg [mailto:igor.vaynberg@gmail.com]
>>> Sent: Thursday, September 18, 2008 1:56 PM
>>> To: users@wicket.apache.org
>>> Subject: Re: Turning off SWARM for testing?
>>>
>>> sorry, i dont know anything about swarm itself. maybe during test you
>
>>> override setuphive() and give it a policy that allows everything and
>>> does not require a login.
>>>
>>> -igor
>>>
>>> On Thu, Sep 18, 2008 at 10:45 AM, Neil McT
>>> <ne...@yahoo.co.uk>
>>> wrote:
>>>>
>>>> Sorry not sure what you mean by 'swarm auth strategy'
>>>>
>>>> My application class extends SwarmWebApplication and the only SWARM
>>>> specific methods it overrides are getHiveKey() and setUpHive() -
>>>> where
>>>
>>>> I add the policy file. Is it one of these that I should be 'nulling
>>> out' for testing?
>>>>
>>>> Thanks.
>>>>
>>>>
>>>>
>>>>
>>>> igor.vaynberg wrote:
>>>>>
>>>>> have an overrideable method on your application boolean
>>>>> issecurityenabled(), and only add swarm auth strategy if it returns
>
>>>>> true. that way during tests you can give tester a subclass of your
>>>>> app that returns false.
>>>>>
>>>>> -igor
>>>>>
>>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Turning-off-SWARM-for-testing--tp19557765p1955
>>>> 8
>>>> 1 53.html Sent from the Wicket - User mailing list archive at
>>>> Nabble.com.
>>>>
>>>>
>>>> --------------------------------------------------------------------
>>>> - To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: Turning off SWARM for testing?

Posted by "Hoover, William " <wh...@nemours.org>.
Yeah, really :) the param name in the register method is for the hive
key is "queen"... hmmm... I wonder if any exceptions refer to you
getting stung

-----Original Message-----
From: jcarman@carmanconsulting.com [mailto:jcarman@carmanconsulting.com]
On Behalf Of James Carman
Sent: Thursday, September 18, 2008 2:24 PM
To: users@wicket.apache.org
Subject: Re: Turning off SWARM for testing?

Way to poach a name! :)

On Thu, Sep 18, 2008 at 2:17 PM, Hoover, William <wh...@nemours.org>
wrote:
> Yes, the same org.apache.wicket.security.hive.HiveMind used to 
> HiveMind.registerHive(getHiveKey(), factory) the factory in
> SwarmWebApplication#setUpHive()
>
> -----Original Message-----
> From: jcarman@carmanconsulting.com 
> [mailto:jcarman@carmanconsulting.com]
> On Behalf Of James Carman
> Sent: Thursday, September 18, 2008 2:07 PM
> To: users@wicket.apache.org
> Subject: Re: Turning off SWARM for testing?
>
> HiveMind?
>
> On Thu, Sep 18, 2008 at 2:03 PM, Hoover, William <wh...@nemours.org>
> wrote:
>> Try HiveMind.unregisterHive(hiveKey);
>>
>> -----Original Message-----
>> From: Igor Vaynberg [mailto:igor.vaynberg@gmail.com]
>> Sent: Thursday, September 18, 2008 1:56 PM
>> To: users@wicket.apache.org
>> Subject: Re: Turning off SWARM for testing?
>>
>> sorry, i dont know anything about swarm itself. maybe during test you

>> override setuphive() and give it a policy that allows everything and 
>> does not require a login.
>>
>> -igor
>>
>> On Thu, Sep 18, 2008 at 10:45 AM, Neil McT 
>> <ne...@yahoo.co.uk>
>> wrote:
>>>
>>> Sorry not sure what you mean by 'swarm auth strategy'
>>>
>>> My application class extends SwarmWebApplication and the only SWARM 
>>> specific methods it overrides are getHiveKey() and setUpHive() - 
>>> where
>>
>>> I add the policy file. Is it one of these that I should be 'nulling
>> out' for testing?
>>>
>>> Thanks.
>>>
>>>
>>>
>>>
>>> igor.vaynberg wrote:
>>>>
>>>> have an overrideable method on your application boolean 
>>>> issecurityenabled(), and only add swarm auth strategy if it returns

>>>> true. that way during tests you can give tester a subclass of your 
>>>> app that returns false.
>>>>
>>>> -igor
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Turning-off-SWARM-for-testing--tp19557765p1955
>>> 8
>>> 1 53.html Sent from the Wicket - User mailing list archive at 
>>> Nabble.com.
>>>
>>>
>>> --------------------------------------------------------------------
>>> - To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Turning off SWARM for testing?

Posted by James Carman <ja...@carmanconsulting.com>.
Way to poach a name! :)

On Thu, Sep 18, 2008 at 2:17 PM, Hoover, William <wh...@nemours.org> wrote:
> Yes, the same org.apache.wicket.security.hive.HiveMind used to
> HiveMind.registerHive(getHiveKey(), factory) the factory in
> SwarmWebApplication#setUpHive()
>
> -----Original Message-----
> From: jcarman@carmanconsulting.com [mailto:jcarman@carmanconsulting.com]
> On Behalf Of James Carman
> Sent: Thursday, September 18, 2008 2:07 PM
> To: users@wicket.apache.org
> Subject: Re: Turning off SWARM for testing?
>
> HiveMind?
>
> On Thu, Sep 18, 2008 at 2:03 PM, Hoover, William <wh...@nemours.org>
> wrote:
>> Try HiveMind.unregisterHive(hiveKey);
>>
>> -----Original Message-----
>> From: Igor Vaynberg [mailto:igor.vaynberg@gmail.com]
>> Sent: Thursday, September 18, 2008 1:56 PM
>> To: users@wicket.apache.org
>> Subject: Re: Turning off SWARM for testing?
>>
>> sorry, i dont know anything about swarm itself. maybe during test you
>> override setuphive() and give it a policy that allows everything and
>> does not require a login.
>>
>> -igor
>>
>> On Thu, Sep 18, 2008 at 10:45 AM, Neil McT
>> <ne...@yahoo.co.uk>
>> wrote:
>>>
>>> Sorry not sure what you mean by 'swarm auth strategy'
>>>
>>> My application class extends SwarmWebApplication and the only SWARM
>>> specific methods it overrides are getHiveKey() and setUpHive() -
>>> where
>>
>>> I add the policy file. Is it one of these that I should be 'nulling
>> out' for testing?
>>>
>>> Thanks.
>>>
>>>
>>>
>>>
>>> igor.vaynberg wrote:
>>>>
>>>> have an overrideable method on your application boolean
>>>> issecurityenabled(), and only add swarm auth strategy if it returns
>>>> true. that way during tests you can give tester a subclass of your
>>>> app that returns false.
>>>>
>>>> -igor
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Turning-off-SWARM-for-testing--tp19557765p19558
>>> 1 53.html Sent from the Wicket - User mailing list archive at
>>> Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: Turning off SWARM for testing?

Posted by "Hoover, William " <wh...@nemours.org>.
Yes, the same org.apache.wicket.security.hive.HiveMind used to
HiveMind.registerHive(getHiveKey(), factory) the factory in
SwarmWebApplication#setUpHive()

-----Original Message-----
From: jcarman@carmanconsulting.com [mailto:jcarman@carmanconsulting.com]
On Behalf Of James Carman
Sent: Thursday, September 18, 2008 2:07 PM
To: users@wicket.apache.org
Subject: Re: Turning off SWARM for testing?

HiveMind?

On Thu, Sep 18, 2008 at 2:03 PM, Hoover, William <wh...@nemours.org>
wrote:
> Try HiveMind.unregisterHive(hiveKey);
>
> -----Original Message-----
> From: Igor Vaynberg [mailto:igor.vaynberg@gmail.com]
> Sent: Thursday, September 18, 2008 1:56 PM
> To: users@wicket.apache.org
> Subject: Re: Turning off SWARM for testing?
>
> sorry, i dont know anything about swarm itself. maybe during test you 
> override setuphive() and give it a policy that allows everything and 
> does not require a login.
>
> -igor
>
> On Thu, Sep 18, 2008 at 10:45 AM, Neil McT 
> <ne...@yahoo.co.uk>
> wrote:
>>
>> Sorry not sure what you mean by 'swarm auth strategy'
>>
>> My application class extends SwarmWebApplication and the only SWARM 
>> specific methods it overrides are getHiveKey() and setUpHive() - 
>> where
>
>> I add the policy file. Is it one of these that I should be 'nulling
> out' for testing?
>>
>> Thanks.
>>
>>
>>
>>
>> igor.vaynberg wrote:
>>>
>>> have an overrideable method on your application boolean 
>>> issecurityenabled(), and only add swarm auth strategy if it returns 
>>> true. that way during tests you can give tester a subclass of your 
>>> app that returns false.
>>>
>>> -igor
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Turning-off-SWARM-for-testing--tp19557765p19558
>> 1 53.html Sent from the Wicket - User mailing list archive at 
>> Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Turning off SWARM for testing?

Posted by James Carman <ja...@carmanconsulting.com>.
HiveMind?

On Thu, Sep 18, 2008 at 2:03 PM, Hoover, William <wh...@nemours.org> wrote:
> Try HiveMind.unregisterHive(hiveKey);
>
> -----Original Message-----
> From: Igor Vaynberg [mailto:igor.vaynberg@gmail.com]
> Sent: Thursday, September 18, 2008 1:56 PM
> To: users@wicket.apache.org
> Subject: Re: Turning off SWARM for testing?
>
> sorry, i dont know anything about swarm itself. maybe during test you
> override setuphive() and give it a policy that allows everything and
> does not require a login.
>
> -igor
>
> On Thu, Sep 18, 2008 at 10:45 AM, Neil McT <ne...@yahoo.co.uk>
> wrote:
>>
>> Sorry not sure what you mean by 'swarm auth strategy'
>>
>> My application class extends SwarmWebApplication and the only SWARM
>> specific methods it overrides are getHiveKey() and setUpHive() - where
>
>> I add the policy file. Is it one of these that I should be 'nulling
> out' for testing?
>>
>> Thanks.
>>
>>
>>
>>
>> igor.vaynberg wrote:
>>>
>>> have an overrideable method on your application boolean
>>> issecurityenabled(), and only add swarm auth strategy if it returns
>>> true. that way during tests you can give tester a subclass of your
>>> app that returns false.
>>>
>>> -igor
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Turning-off-SWARM-for-testing--tp19557765p195581
>> 53.html Sent from the Wicket - User mailing list archive at
>> Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Turning off SWARM for testing?

Posted by Neil McT <ne...@yahoo.co.uk>.

Sorry - fairly new to Wicket - don't quite follow. Do you mean subclass
AuthenticatedWebSession in the test environment to always return true on
authenticate() ? How would this play with SWARM?

I have just found an, albeit more convoluted, solution....

My TestApplication class overrides setupStrategyFactory to return a dummy
strategy factory which is configured with a stub implementation of
ISecureComponent. Digging about in the SWARM code it seems that only
subclasses of this stub will be authenticated - and as there are no
subclasses, authentication has been essentially circumvented.

Not the prettiest solution but it _seems_ to work.






Martijn Dashorst wrote:
> 
> Why not create an authenticated session instead?
> 
> Martijn
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Turning-off-SWARM-for-testing--tp19557765p19560295.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Turning off SWARM for testing?

Posted by Martijn Dashorst <ma...@gmail.com>.
Why not create an authenticated session instead?

Martijn

On Thu, Sep 18, 2008 at 8:59 PM, Neil McT <ne...@yahoo.co.uk> wrote:
>
>
> I tried that but it didn't work.
>
> But it did remove the need for me to manufacture a unique hive-key per
> WicketTester instance... so it wasn't a total loss :)
>
>
>
>
> Hoover, William wrote:
>>
>> Try HiveMind.unregisterHive(hiveKey);
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Turning-off-SWARM-for-testing--tp19557765p19558799.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: Turning off SWARM for testing?

Posted by Neil McT <ne...@yahoo.co.uk>.

I tried that but it didn't work.

But it did remove the need for me to manufacture a unique hive-key per
WicketTester instance... so it wasn't a total loss :) 




Hoover, William wrote:
> 
> Try HiveMind.unregisterHive(hiveKey); 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Turning-off-SWARM-for-testing--tp19557765p19558799.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: Turning off SWARM for testing?

Posted by "Hoover, William " <wh...@nemours.org>.
Try HiveMind.unregisterHive(hiveKey); 

-----Original Message-----
From: Igor Vaynberg [mailto:igor.vaynberg@gmail.com] 
Sent: Thursday, September 18, 2008 1:56 PM
To: users@wicket.apache.org
Subject: Re: Turning off SWARM for testing?

sorry, i dont know anything about swarm itself. maybe during test you
override setuphive() and give it a policy that allows everything and
does not require a login.

-igor

On Thu, Sep 18, 2008 at 10:45 AM, Neil McT <ne...@yahoo.co.uk>
wrote:
>
> Sorry not sure what you mean by 'swarm auth strategy'
>
> My application class extends SwarmWebApplication and the only SWARM 
> specific methods it overrides are getHiveKey() and setUpHive() - where

> I add the policy file. Is it one of these that I should be 'nulling
out' for testing?
>
> Thanks.
>
>
>
>
> igor.vaynberg wrote:
>>
>> have an overrideable method on your application boolean 
>> issecurityenabled(), and only add swarm auth strategy if it returns 
>> true. that way during tests you can give tester a subclass of your 
>> app that returns false.
>>
>> -igor
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/Turning-off-SWARM-for-testing--tp19557765p195581
> 53.html Sent from the Wicket - User mailing list archive at 
> Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Turning off SWARM for testing?

Posted by Igor Vaynberg <ig...@gmail.com>.
sorry, i dont know anything about swarm itself. maybe during test you
override setuphive() and give it a policy that allows everything and
does not require a login.

-igor

On Thu, Sep 18, 2008 at 10:45 AM, Neil McT <ne...@yahoo.co.uk> wrote:
>
> Sorry not sure what you mean by 'swarm auth strategy'
>
> My application class extends SwarmWebApplication and the only SWARM specific
> methods it overrides are getHiveKey() and setUpHive() - where I add the
> policy file. Is it one of these that I should be 'nulling out' for testing?
>
> Thanks.
>
>
>
>
> igor.vaynberg wrote:
>>
>> have an overrideable method on your application boolean
>> issecurityenabled(), and only add swarm auth strategy if it returns
>> true. that way during tests you can give tester a subclass of your app
>> that returns false.
>>
>> -igor
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Turning-off-SWARM-for-testing--tp19557765p19558153.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Turning off SWARM for testing?

Posted by Neil McT <ne...@yahoo.co.uk>.
Sorry not sure what you mean by 'swarm auth strategy'

My application class extends SwarmWebApplication and the only SWARM specific
methods it overrides are getHiveKey() and setUpHive() - where I add the
policy file. Is it one of these that I should be 'nulling out' for testing?

Thanks.




igor.vaynberg wrote:
> 
> have an overrideable method on your application boolean
> issecurityenabled(), and only add swarm auth strategy if it returns
> true. that way during tests you can give tester a subclass of your app
> that returns false.
> 
> -igor
> 
> 

-- 
View this message in context: http://www.nabble.com/Turning-off-SWARM-for-testing--tp19557765p19558153.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Turning off SWARM for testing?

Posted by Igor Vaynberg <ig...@gmail.com>.
have an overrideable method on your application boolean
issecurityenabled(), and only add swarm auth strategy if it returns
true. that way during tests you can give tester a subclass of your app
that returns false.

-igor

On Thu, Sep 18, 2008 at 10:21 AM, Neil McT <ne...@yahoo.co.uk> wrote:
>
> Is there any way to turn-off / circumvent SWARM for testing?
>
> I'm using WicketTester and any time I attempt to navigate to a protected
> page (i.e. implements ISecurePage) I get bounced back to my login-page.
>
> I'd prefer not to have to go to the lengths of 'logging in' a user, just for
> tests as I'd prefer my unit tests to be as focussed as possible.
>
> Any help much appreciated.
>
> Neil.
> --
> View this message in context: http://www.nabble.com/Turning-off-SWARM-for-testing--tp19557765p19557765.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org