Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 150456

Summary: Trac connector: refactor test cases to use repositories at mylar.eclipse.org
Product: z_Archived Reporter: Steffen Pingel <steffen.pingel>
Component: MylynAssignee: Steffen Pingel <steffen.pingel>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P2 CC: pombredanne
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Runs all test cases against mylar.eclipse.org
none
mylar/context/zip
none
Fixes privilege requirement
none
Moves test utils to context.tests
none
mylar/context/zip none

Description Steffen Pingel CLA 2006-07-12 18:10:27 EDT
Test cases for the Trac connector should use the repositories at mylar.eclipse.org:

 http://mylar.eclipse.org/trac096
 http://mylar.eclipse.org/trac010
Comment 1 Steffen Pingel CLA 2006-07-30 13:01:51 EDT
Created attachment 47026 [details]
Runs all test cases against mylar.eclipse.org

I have updated the Trac XmlRpcPlugin and the Trac 0.10 repository on mylar.eclipse.org to the latest version (this was necesary because of important bug fixes in the latest revision of the XmlRpcPlugin).

The TracTestUtils class contains a generic method to read the credentials file. This could possibly moved to the core tests so a credentials.properties file has to be provided only once and not for each connector.
Comment 2 Steffen Pingel CLA 2006-07-30 13:01:53 EDT
Created attachment 47027 [details]
mylar/context/zip
Comment 3 Mik Kersten CLA 2006-07-30 15:32:37 EDT
Yup, I was thinking that context.tests we should keep the credentials file so that we don't promote duplicating it.  Do you want to create a patch for that?  Both Bugzilla and Trac need to be updated.

Tried to apply the patch but I get a bunch of errors with stack traces like:

org.eclipse.mylar.internal.trac.core.TracHttpClientTransportFactory$TracHttpException: HTTP Error 403
	at org.eclipse.mylar.internal.trac.core.TracHttpClientTransportFactory$TracHttpClientTransport.getInputStream(TracHttpClientTransportFactory.java:80)
	at org.eclipse.mylar.internal.trac.core.TracHttpClientTransportFactory$TracHttpClientTransport.sendRequest(TracHttpClientTransportFactory.java:143)
	at org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:53)
	at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:166)
	at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:157)
	at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:146)
	at org.eclipse.mylar.trac.tests.support.XmlRpcServer.call(XmlRpcServer.java:297)
	at org.eclipse.mylar.trac.tests.support.XmlRpcServer.access$1(XmlRpcServer.java:291)
	at org.eclipse.mylar.trac.tests.support.XmlRpcServer$Ticket.getValues(XmlRpcServer.java:179)
	at org.eclipse.mylar.trac.tests.AbstractTracClientSearchTest.assertTicketEquals(AbstractTracClientSearchTest.java:60)
	at org.eclipse.mylar.trac.tests.TracXmlRpcClientSearchTest.testSearchValidateTicket(TracXmlRpcClientSearchTest.java:37)

Comment 4 Steffen Pingel CLA 2006-07-30 15:42:44 EDT
Created attachment 47032 [details]
Fixes privilege requirement

I changed the required credentials privilege level from ADMIN to USER since this is sufficient for running the test cases. To run TracXmlRpcTest (which is not part of AllTracTests) additional authentication information is required in the credentials file.
Comment 5 Steffen Pingel CLA 2006-07-30 15:48:39 EDT
(In reply to comment #3)
> Yup, I was thinking that context.tests we should keep the credentials file so
> that we don't promote duplicating it.  Do you want to create a patch for that? 
> Both Bugzilla and Trac need to be updated.

Alright. I'll do so when this patch has been merged. Let me know if you prefer to have the change as part of this patch then I'll create another one.

Comment 6 Steffen Pingel CLA 2006-07-30 18:10:19 EDT
Created attachment 47034 [details]
Moves test utils to context.tests

I have done the refactoring of the TestUtils as suggested. The patch contains all changes including the refactoring of the Trac test cases for mylar.eclipse.org.
Comment 7 Steffen Pingel CLA 2006-07-30 18:10:44 EDT
Created attachment 47035 [details]
mylar/context/zip
Comment 8 Mik Kersten CLA 2006-07-31 02:22:28 EDT
Good stuff Steffen, patch applied.