djcoleman commented on issue #4047: URL: https://github.com/apache/camel-quarkus/issues/4047#issuecomment-1401772018
At first I thought this was going to be a fairly quick task based on the Geocoder tests, but I found myself heading down a warren of rabbit holes with this. In order to test the Dropbox extension with Wiremock, the wiremock server URL must be passed to the dropbox client within the Camel component. I first tried creating an instance of `DbxClientV2` (the client supplied by the Dropbox SDK), but it had limited support for passing in a new host - I had to access a private constructor via reflection to be able to pass in the Wiremock URL as well as the credentials. The next issue was setting the client in the Camel component. I had to create a sub-class of the `DropboxComponent` and register that in place of the original. The sub-class overrode the `createEndpoint` method that first called the parent implementation and then accessed the `DropboxConfiguration` object, to which I could pass the `DbxClientV2` object. However, this still did not work as the `DbxClientV2` object doesn't handle port numbers - it only expects hostnames, so URL creation fails. I don't know if the Wiremock proxy support can be used to create an alias that can be used instead of `localhost:{randomPort}`, but I've spent more time than I'd intended on this already. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org