Re: [Dev] Build fails in identity-outbound-auth-passwordPolicy

2017-11-22 Thread Keerthika Mahendralingam
Hi All,

We fixed this issue by adding the file to the resource directory. Please
find the fix in [1].

[1].
https://github.com/wso2-extensions/identity-outbound-auth-passwordPolicy/pull/11

Thanks,
Keerthika.

On Thu, Nov 16, 2017 at 7:33 PM, Maduranga Siriwardena 
wrote:

> As these are unit tests, if some config is read from a file, I think we
> need to mock the behavior, rather than reading the configs from a actual
> config file in a product distribution.
>
> Thanks,
>
> On Thu, Nov 16, 2017 at 7:20 PM, Saneth Dharmakeerthi 
> wrote:
>
>> Hi,
>>
>> IMO this should be a part of automation test. Before starting the test
>> method, it should set all the prerequisites.
>>
>>
>> Thanks and Best Regards,
>>
>> Saneth Dharmakeerthi
>> *Associate Technical Lead*
>> WSO2, Inc.
>> Mobile: +94772325511 <+94%2077%20232%205511>
>>
>> 
>>
>> On Thu, Nov 16, 2017 at 5:46 PM, Prakhash Sivakumar 
>> wrote:
>>
>>> Hi Nadeeshani,
>>>
>>> You need to add the CARBON_CONFIG_DIR_PATH as environment variable
>>> before building the code
>>> ex :  export CARBON_CONFIG_DIR_PATH="/repository/conf"
>>>
>>> Thanks,
>>> Prakhash
>>>
>>> On Thu, Nov 16, 2017 at 2:12 PM, Nadeeshani Pathirennehelage <
>>> nadeesha...@wso2.com> wrote:
>>>
 Hi All,

 When I am trying to build the identity-outbound-auth-passwordPolicy[1]
 it fails due to a test failure.

 Error is given below.

 Tests run: 19, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 5.746
 sec <<< FAILURE! - in TestSuite
 testInitiateAuthRequestSuccess(org.wso2.carbon.extension.ide
 ntity.authenticator.passwordpolicy.test.PasswordChangeEnforcerOnExpirationTest)
 Time elapsed: 0.09 sec  <<< FAILURE!
 java.lang.ExceptionInInitializerError: null
 at java.util.Hashtable.put(Hashtable.java:514)
 at java.util.Properties.setProperty(Properties.java:161)
 at java.lang.System.setProperty(System.java:787)
 at org.wso2.carbon.utils.CarbonUtils.getCarbonHome(CarbonUtils.
 java:240)
 at org.wso2.carbon.utils.CarbonUtils.getCarbonConfigDirPath(Car
 bonUtils.java:284)
 at org.wso2.carbon.identity.policy.password.PasswordChangeUtils
 .loadProperties(PasswordChangeUtils.java:52)
 at org.wso2.carbon.identity.policy.password.PasswordChangeUtils
 .(PasswordChangeUtils.java:41)
 at org.wso2.carbon.identity.policy.password.PasswordChangeEnfor
 cerOnExpiration.initiateAuthRequest(PasswordChangeEnforcerOn
 Expiration.java:165)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
 ssorImpl.java:57)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
 thodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at org.powermock.reflect.internal.WhiteboxImpl.performMethodInv
 ocation(WhiteboxImpl.java:1899)
 at org.powermock.reflect.internal.WhiteboxImpl.doInvokeMethod(W
 hiteboxImpl.java:801)
 at org.powermock.reflect.internal.WhiteboxImpl.invokeMethod(Whi
 teboxImpl.java:666)
 at org.powermock.reflect.Whitebox.invokeMethod(Whitebox.java:401)
 at org.wso2.carbon.extension.identity.authenticator.passwordpol
 icy.test.PasswordChangeEnforcerOnExpirationTest.testInitiate
 AuthRequestSuccess(PasswordChangeEnforcerOnExpirationTest.java:265)


 Results :

 Failed tests:
   PasswordChangeEnforcerOnExpirationTest.testInitiateAuthRequestSuccess:265
 » ExceptionInInitializer


 I tried to build it using both Java7 and Java8. But it gives the same
 error.

 Any thoughts or help on this is highly appreciated.

 [1] https://github.com/wso2-extensions/identity-outbound-auth-pa
 sswordPolicy

 Thanks,
 Nadeeshani.
 --
 Pathirennehelage Nadeeshani
 Software Engineer | WSO2 Inc.
 Platform Security Team
 mobile : +94 716545223 <+94%2071%20654%205223>


>>>
>>>
>>> --
>>> Prakhash Sivakumar
>>> Software Engineer | WSO2 Inc
>>> Platform Security Team
>>> Mobile : +94771510080 <+94%2077%20151%200080>
>>> Blog : https://medium.com/@PrakhashS
>>>
>>
>>
>
>
> --
> Maduranga Siriwardena
> Senior Software Engineer
> WSO2 Inc; http://wso2.com/
>
> Email: madura...@wso2.com
> Mobile: +94718990591 <+94%2071%20899%200591>
> Blog: *https://madurangasiriwardena.wordpress.com/
> *
> 
>



-- 

Keerthika Mahendralingam
Software Engineer
Mobile :+94 (0) 776 121144
keerth...@wso2.com
WSO2, Inc.
lean . enterprise . middleware
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Build fails in identity-outbound-auth-passwordPolicy

2017-11-16 Thread Maduranga Siriwardena
As these are unit tests, if some config is read from a file, I think we
need to mock the behavior, rather than reading the configs from a actual
config file in a product distribution.

Thanks,

On Thu, Nov 16, 2017 at 7:20 PM, Saneth Dharmakeerthi 
wrote:

> Hi,
>
> IMO this should be a part of automation test. Before starting the test
> method, it should set all the prerequisites.
>
>
> Thanks and Best Regards,
>
> Saneth Dharmakeerthi
> *Associate Technical Lead*
> WSO2, Inc.
> Mobile: +94772325511 <+94%2077%20232%205511>
>
> 
>
> On Thu, Nov 16, 2017 at 5:46 PM, Prakhash Sivakumar 
> wrote:
>
>> Hi Nadeeshani,
>>
>> You need to add the CARBON_CONFIG_DIR_PATH as environment variable before
>> building the code
>> ex :  export CARBON_CONFIG_DIR_PATH="/repository/conf"
>>
>> Thanks,
>> Prakhash
>>
>> On Thu, Nov 16, 2017 at 2:12 PM, Nadeeshani Pathirennehelage <
>> nadeesha...@wso2.com> wrote:
>>
>>> Hi All,
>>>
>>> When I am trying to build the identity-outbound-auth-passwordPolicy[1]
>>> it fails due to a test failure.
>>>
>>> Error is given below.
>>>
>>> Tests run: 19, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 5.746
>>> sec <<< FAILURE! - in TestSuite
>>> testInitiateAuthRequestSuccess(org.wso2.carbon.extension.ide
>>> ntity.authenticator.passwordpolicy.test.PasswordChangeEnforcerOnExpirationTest)
>>> Time elapsed: 0.09 sec  <<< FAILURE!
>>> java.lang.ExceptionInInitializerError: null
>>> at java.util.Hashtable.put(Hashtable.java:514)
>>> at java.util.Properties.setProperty(Properties.java:161)
>>> at java.lang.System.setProperty(System.java:787)
>>> at org.wso2.carbon.utils.CarbonUtils.getCarbonHome(CarbonUtils.
>>> java:240)
>>> at org.wso2.carbon.utils.CarbonUtils.getCarbonConfigDirPath(Car
>>> bonUtils.java:284)
>>> at org.wso2.carbon.identity.policy.password.PasswordChangeUtils
>>> .loadProperties(PasswordChangeUtils.java:52)
>>> at org.wso2.carbon.identity.policy.password.PasswordChangeUtils
>>> .(PasswordChangeUtils.java:41)
>>> at org.wso2.carbon.identity.policy.password.PasswordChangeEnfor
>>> cerOnExpiration.initiateAuthRequest(PasswordChangeEnforcerOn
>>> Expiration.java:165)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
>>> ssorImpl.java:57)
>>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
>>> thodAccessorImpl.java:43)
>>> at java.lang.reflect.Method.invoke(Method.java:606)
>>> at org.powermock.reflect.internal.WhiteboxImpl.performMethodInv
>>> ocation(WhiteboxImpl.java:1899)
>>> at org.powermock.reflect.internal.WhiteboxImpl.doInvokeMethod(W
>>> hiteboxImpl.java:801)
>>> at org.powermock.reflect.internal.WhiteboxImpl.invokeMethod(Whi
>>> teboxImpl.java:666)
>>> at org.powermock.reflect.Whitebox.invokeMethod(Whitebox.java:401)
>>> at org.wso2.carbon.extension.identity.authenticator.passwordpol
>>> icy.test.PasswordChangeEnforcerOnExpirationTest.testInitiate
>>> AuthRequestSuccess(PasswordChangeEnforcerOnExpirationTest.java:265)
>>>
>>>
>>> Results :
>>>
>>> Failed tests:
>>>   PasswordChangeEnforcerOnExpirationTest.testInitiateAuthRequestSuccess:265
>>> » ExceptionInInitializer
>>>
>>>
>>> I tried to build it using both Java7 and Java8. But it gives the same
>>> error.
>>>
>>> Any thoughts or help on this is highly appreciated.
>>>
>>> [1] https://github.com/wso2-extensions/identity-outbound-auth-pa
>>> sswordPolicy
>>>
>>> Thanks,
>>> Nadeeshani.
>>> --
>>> Pathirennehelage Nadeeshani
>>> Software Engineer | WSO2 Inc.
>>> Platform Security Team
>>> mobile : +94 716545223 <+94%2071%20654%205223>
>>>
>>>
>>
>>
>> --
>> Prakhash Sivakumar
>> Software Engineer | WSO2 Inc
>> Platform Security Team
>> Mobile : +94771510080 <+94%2077%20151%200080>
>> Blog : https://medium.com/@PrakhashS
>>
>
>


-- 
Maduranga Siriwardena
Senior Software Engineer
WSO2 Inc; http://wso2.com/

Email: madura...@wso2.com
Mobile: +94718990591
Blog: *https://madurangasiriwardena.wordpress.com/
*

___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Build fails in identity-outbound-auth-passwordPolicy

2017-11-16 Thread Saneth Dharmakeerthi
Hi,

IMO this should be a part of automation test. Before starting the test
method, it should set all the prerequisites.


Thanks and Best Regards,

Saneth Dharmakeerthi
*Associate Technical Lead*
WSO2, Inc.
Mobile: +94772325511



On Thu, Nov 16, 2017 at 5:46 PM, Prakhash Sivakumar 
wrote:

> Hi Nadeeshani,
>
> You need to add the CARBON_CONFIG_DIR_PATH as environment variable before
> building the code
> ex :  export CARBON_CONFIG_DIR_PATH="/repository/conf"
>
> Thanks,
> Prakhash
>
> On Thu, Nov 16, 2017 at 2:12 PM, Nadeeshani Pathirennehelage <
> nadeesha...@wso2.com> wrote:
>
>> Hi All,
>>
>> When I am trying to build the identity-outbound-auth-passwordPolicy[1]
>> it fails due to a test failure.
>>
>> Error is given below.
>>
>> Tests run: 19, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 5.746
>> sec <<< FAILURE! - in TestSuite
>> testInitiateAuthRequestSuccess(org.wso2.carbon.extension.ide
>> ntity.authenticator.passwordpolicy.test.PasswordChangeEnforcerOnExpirationTest)
>> Time elapsed: 0.09 sec  <<< FAILURE!
>> java.lang.ExceptionInInitializerError: null
>> at java.util.Hashtable.put(Hashtable.java:514)
>> at java.util.Properties.setProperty(Properties.java:161)
>> at java.lang.System.setProperty(System.java:787)
>> at org.wso2.carbon.utils.CarbonUtils.getCarbonHome(CarbonUtils.
>> java:240)
>> at org.wso2.carbon.utils.CarbonUtils.getCarbonConfigDirPath(Car
>> bonUtils.java:284)
>> at org.wso2.carbon.identity.policy.password.PasswordChangeUtils
>> .loadProperties(PasswordChangeUtils.java:52)
>> at org.wso2.carbon.identity.policy.password.PasswordChangeUtils
>> .(PasswordChangeUtils.java:41)
>> at org.wso2.carbon.identity.policy.password.PasswordChangeEnfor
>> cerOnExpiration.initiateAuthRequest(PasswordCh
>> angeEnforcerOnExpiration.java:165)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
>> ssorImpl.java:57)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
>> thodAccessorImpl.java:43)
>> at java.lang.reflect.Method.invoke(Method.java:606)
>> at org.powermock.reflect.internal.WhiteboxImpl.performMethodInv
>> ocation(WhiteboxImpl.java:1899)
>> at org.powermock.reflect.internal.WhiteboxImpl.doInvokeMethod(
>> WhiteboxImpl.java:801)
>> at org.powermock.reflect.internal.WhiteboxImpl.invokeMethod(
>> WhiteboxImpl.java:666)
>> at org.powermock.reflect.Whitebox.invokeMethod(Whitebox.java:401)
>> at org.wso2.carbon.extension.identity.authenticator.passwordpol
>> icy.test.PasswordChangeEnforcerOnExpirationTest.testInitiate
>> AuthRequestSuccess(PasswordChangeEnforcerOnExpirationTest.java:265)
>>
>>
>> Results :
>>
>> Failed tests:
>>   PasswordChangeEnforcerOnExpirationTest.testInitiateAuthRequestSuccess:265
>> » ExceptionInInitializer
>>
>>
>> I tried to build it using both Java7 and Java8. But it gives the same
>> error.
>>
>> Any thoughts or help on this is highly appreciated.
>>
>> [1] https://github.com/wso2-extensions/identity-outbound-auth-pa
>> sswordPolicy
>>
>> Thanks,
>> Nadeeshani.
>> --
>> Pathirennehelage Nadeeshani
>> Software Engineer | WSO2 Inc.
>> Platform Security Team
>> mobile : +94 716545223 <+94%2071%20654%205223>
>>
>>
>
>
> --
> Prakhash Sivakumar
> Software Engineer | WSO2 Inc
> Platform Security Team
> Mobile : +94771510080 <+94%2077%20151%200080>
> Blog : https://medium.com/@PrakhashS
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Build fails in identity-outbound-auth-passwordPolicy

2017-11-16 Thread Prakhash Sivakumar
Hi Nadeeshani,

You need to add the CARBON_CONFIG_DIR_PATH as environment variable before
building the code
ex :  export CARBON_CONFIG_DIR_PATH="/repository/conf"

Thanks,
Prakhash

On Thu, Nov 16, 2017 at 2:12 PM, Nadeeshani Pathirennehelage <
nadeesha...@wso2.com> wrote:

> Hi All,
>
> When I am trying to build the identity-outbound-auth-passwordPolicy[1] it
> fails due to a test failure.
>
> Error is given below.
>
> Tests run: 19, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 5.746 sec
> <<< FAILURE! - in TestSuite
> testInitiateAuthRequestSuccess(org.wso2.carbon.extension.
> identity.authenticator.passwordpolicy.test.PasswordChangeEnforcerOnExpirationTest)
> Time elapsed: 0.09 sec  <<< FAILURE!
> java.lang.ExceptionInInitializerError: null
> at java.util.Hashtable.put(Hashtable.java:514)
> at java.util.Properties.setProperty(Properties.java:161)
> at java.lang.System.setProperty(System.java:787)
> at org.wso2.carbon.utils.CarbonUtils.getCarbonHome(
> CarbonUtils.java:240)
> at org.wso2.carbon.utils.CarbonUtils.getCarbonConfigDirPath(
> CarbonUtils.java:284)
> at org.wso2.carbon.identity.policy.password.PasswordChangeUtils.
> loadProperties(PasswordChangeUtils.java:52)
> at org.wso2.carbon.identity.policy.password.
> PasswordChangeUtils.(PasswordChangeUtils.java:41)
> at org.wso2.carbon.identity.policy.password.
> PasswordChangeEnforcerOnExpiration.initiateAuthRequest(
> PasswordChangeEnforcerOnExpiration.java:165)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.powermock.reflect.internal.WhiteboxImpl.
> performMethodInvocation(WhiteboxImpl.java:1899)
> at org.powermock.reflect.internal.WhiteboxImpl.
> doInvokeMethod(WhiteboxImpl.java:801)
> at org.powermock.reflect.internal.WhiteboxImpl.
> invokeMethod(WhiteboxImpl.java:666)
> at org.powermock.reflect.Whitebox.invokeMethod(Whitebox.java:401)
> at org.wso2.carbon.extension.identity.authenticator.
> passwordpolicy.test.PasswordChangeEnforcerOnExpirationTest.
> testInitiateAuthRequestSuccess(PasswordChangeEnforcerOnExpira
> tionTest.java:265)
>
>
> Results :
>
> Failed tests:
>   PasswordChangeEnforcerOnExpirationTest.testInitiateAuthRequestSuccess:265
> » ExceptionInInitializer
>
>
> I tried to build it using both Java7 and Java8. But it gives the same
> error.
>
> Any thoughts or help on this is highly appreciated.
>
> [1] https://github.com/wso2-extensions/identity-outbound-auth-
> passwordPolicy
>
> Thanks,
> Nadeeshani.
> --
> Pathirennehelage Nadeeshani
> Software Engineer | WSO2 Inc.
> Platform Security Team
> mobile : +94 716545223 <+94%2071%20654%205223>
>
>


-- 
Prakhash Sivakumar
Software Engineer | WSO2 Inc
Platform Security Team
Mobile : +94771510080
Blog : https://medium.com/@PrakhashS
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Build fails in identity-outbound-auth-passwordPolicy

2017-11-16 Thread Nadeeshani Pathirennehelage
Hi All,

When I am trying to build the identity-outbound-auth-passwordPolicy[1] it
fails due to a test failure.

Error is given below.

Tests run: 19, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 5.746 sec
<<< FAILURE! - in TestSuite
testInitiateAuthRequestSuccess(org.wso2.carbon.extension.identity.authenticator.passwordpolicy.test.PasswordChangeEnforcerOnExpirationTest)
Time elapsed: 0.09 sec  <<< FAILURE!
java.lang.ExceptionInInitializerError: null
at java.util.Hashtable.put(Hashtable.java:514)
at java.util.Properties.setProperty(Properties.java:161)
at java.lang.System.setProperty(System.java:787)
at org.wso2.carbon.utils.CarbonUtils.getCarbonHome(CarbonUtils.java:240)
at
org.wso2.carbon.utils.CarbonUtils.getCarbonConfigDirPath(CarbonUtils.java:284)
at
org.wso2.carbon.identity.policy.password.PasswordChangeUtils.loadProperties(PasswordChangeUtils.java:52)
at
org.wso2.carbon.identity.policy.password.PasswordChangeUtils.(PasswordChangeUtils.java:41)
at
org.wso2.carbon.identity.policy.password.PasswordChangeEnforcerOnExpiration.initiateAuthRequest(PasswordChangeEnforcerOnExpiration.java:165)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at
org.powermock.reflect.internal.WhiteboxImpl.performMethodInvocation(WhiteboxImpl.java:1899)
at
org.powermock.reflect.internal.WhiteboxImpl.doInvokeMethod(WhiteboxImpl.java:801)
at
org.powermock.reflect.internal.WhiteboxImpl.invokeMethod(WhiteboxImpl.java:666)
at org.powermock.reflect.Whitebox.invokeMethod(Whitebox.java:401)
at
org.wso2.carbon.extension.identity.authenticator.passwordpolicy.test.PasswordChangeEnforcerOnExpirationTest.testInitiateAuthRequestSuccess(PasswordChangeEnforcerOnExpirationTest.java:265)


Results :

Failed tests:
  PasswordChangeEnforcerOnExpirationTest.testInitiateAuthRequestSuccess:265
» ExceptionInInitializer


I tried to build it using both Java7 and Java8. But it gives the same error.

Any thoughts or help on this is highly appreciated.

[1] https://github.com/wso2-extensions/identity-outbound-auth-passwordPolicy

Thanks,
Nadeeshani.
-- 
Pathirennehelage Nadeeshani
Software Engineer | WSO2 Inc.
Platform Security Team
mobile : +94 716545223 <+94%2071%20654%205223>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev