If pulling data is hard try pushing it

This is part of the Semicolon&Sons Code Diary - consisting of lessons learned on the job. You're in the architecture category.

Last Updated: 2023-12-03

After upgrading to ActiveStorage, I had an issue in my tests WRT to communicating with an external service. This external service, which was important to test in my e2e tests as it had privacy concerns, had an endpoint that accepted a URL from my main app and visited it to download some data.

Unfortunately, in the test/dev environment, visiting external URLs has issues. For one, if the server is remote (i.e. not in your repo), then it has to call a URL either on localhost (not possible without tunneling) or use an intermediary URL (e.g. s3) etc.

Ultimately, I decided to just push the data to the remote URL instead of asking it to pull it.