kilmajster / ngrok-spring-boot-starter

🚀 Spring Boot tunneling with Ngrok made easy! No matter if you are using Windows, Mac OS X, Linux or even Docker - ngrok binary will be chosen automatically 🤖 so you don't need to care about environment changing etc. auto-configuration magic 🧙‍♂️
MIT License
125 stars 17 forks source link

Start ngrok if the current listened port is not the expected one #55

Closed juherr closed 3 years ago

juherr commented 3 years ago

For #51

juherr commented 3 years ago

Fyi, I didn't make real-life tests, only unit tests with mocks. How do you usually manage it?

kilmajster commented 3 years ago

Basically I don't have any particular way before making new release. I just test manually if new functionality works with dummy app, and when I touched some other part I test also that. Then github checks are testing if minimal configuration works with .github/test-app with real ngrok tunnels in containers of windows, macos, and linux and if yes I'm assuming that everything is ready

juherr commented 3 years ago

Ok, so feel free to ping me if something is going wrong with my changes :)

kilmajster commented 3 years ago

Hi, I made tests on real app and it turns out https is not a valid name for proto, so it was failing with HTTP 400. I spent a moment on figuring out how to start https tunnel, but after a few tests with postman, I found that after starting a tunnel via API it creates http and also https tunnel. Moreover https tunnel gets name that was used in the creation request, http tunnel name gets (http) sufix with space on the begining, that was not mentioned in any way in the documentation 🙄 so my conclusion is that ngrok treats https as a default for http tunneling. Anyways I replaced second call of NgrokApiClient#startTunnel with search for tunnel by name, did some other polishing like version bump etc and released everything as 0.3.7 version

fyi, what I did - https://github.com/kilmajster/ngrok-spring-boot-starter/commit/eb29737c99fc5a1afd80e994db9ef6a5ba5112cd

:)

juherr commented 3 years ago

Awesome! I can't wait to test it.