You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@shindig.apache.org by "Arne Roomann-Kurrik (JIRA)" <ji...@apache.org> on 2009/08/12 02:50:14 UTC

[jira] Created: (SHINDIG-1151) Running PHP unit tests does not load local.config consistently

Running PHP unit tests does not load local.config consistently
--------------------------------------------------------------

                 Key: SHINDIG-1151
                 URL: https://issues.apache.org/jira/browse/SHINDIG-1151
             Project: Shindig
          Issue Type: Bug
          Components: PHP
            Reporter: Arne Roomann-Kurrik
            Priority: Minor


When writing some unit tests that dealt with signed requests, I noticed that hitting http://shindig-url/test caused some tests to fail with an invalid private key error.  The error occurred in SigningFetcherFactory.php on line 70 (with openssl_pkey_get_private).  The default "private_key_phrase" configuration variable ("partuza") was being passed to openssl_pkey_get_private, which was breaking since I use a different private key passphrase.

Debugging showed that when that class was initialized, the Config class was unable to locate local.php and load local configuration variables.  I'm not really sure why this error happened, but I'm attaching a patch which makes the location of local.php more explicit and solves this issue.  

The patch also fixes what I think is a logic error in BasicRemoteContentTest.php - the "partuza" private phrase is hardcoded, instead of being pulled from the configuration file. 

Code review here:
http://codereview.appspot.com/105086

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (SHINDIG-1151) Running PHP unit tests does not load local.config consistently

Posted by "Chris Chabot (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-1151?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Chabot resolved SHINDIG-1151.
-----------------------------------

    Resolution: Fixed
      Assignee: Chris Chabot

Nice catch, patch LGTM & has been committed

> Running PHP unit tests does not load local.config consistently
> --------------------------------------------------------------
>
>                 Key: SHINDIG-1151
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1151
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>            Reporter: Arne Roomann-Kurrik
>            Assignee: Chris Chabot
>            Priority: Minor
>         Attachments: issue105086_1.diff
>
>
> When writing some unit tests that dealt with signed requests, I noticed that hitting http://shindig-url/test caused some tests to fail with an invalid private key error.  The error occurred in SigningFetcherFactory.php on line 70 (with openssl_pkey_get_private).  The default "private_key_phrase" configuration variable ("partuza") was being passed to openssl_pkey_get_private, which was breaking since I use a different private key passphrase.
> Debugging showed that when that class was initialized, the Config class was unable to locate local.php and load local configuration variables.  I'm not really sure why this error happened, but I'm attaching a patch which makes the location of local.php more explicit and solves this issue.  
> The patch also fixes what I think is a logic error in BasicRemoteContentTest.php - the "partuza" private phrase is hardcoded, instead of being pulled from the configuration file. 
> Code review here:
> http://codereview.appspot.com/105086

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-1151) Running PHP unit tests does not load local.config consistently

Posted by "Arne Roomann-Kurrik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-1151?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Arne Roomann-Kurrik updated SHINDIG-1151:
-----------------------------------------

    Attachment: issue105086_1.diff

> Running PHP unit tests does not load local.config consistently
> --------------------------------------------------------------
>
>                 Key: SHINDIG-1151
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1151
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>            Reporter: Arne Roomann-Kurrik
>            Priority: Minor
>         Attachments: issue105086_1.diff
>
>
> When writing some unit tests that dealt with signed requests, I noticed that hitting http://shindig-url/test caused some tests to fail with an invalid private key error.  The error occurred in SigningFetcherFactory.php on line 70 (with openssl_pkey_get_private).  The default "private_key_phrase" configuration variable ("partuza") was being passed to openssl_pkey_get_private, which was breaking since I use a different private key passphrase.
> Debugging showed that when that class was initialized, the Config class was unable to locate local.php and load local configuration variables.  I'm not really sure why this error happened, but I'm attaching a patch which makes the location of local.php more explicit and solves this issue.  
> The patch also fixes what I think is a logic error in BasicRemoteContentTest.php - the "partuza" private phrase is hardcoded, instead of being pulled from the configuration file. 
> Code review here:
> http://codereview.appspot.com/105086

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.