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.

Reply via email to