k1LoW / runn

runn is a package/tool for running operations following a scenario.
https://runn.run
MIT License
404 stars 30 forks source link

How to mock GCP, cloudstorageAdapter.SignUrl? #976

Closed dungtqbap closed 4 weeks ago

dungtqbap commented 4 weeks ago

I write API test base on the guild runn Grpc server

My runn is working fine on other requests, but I'm having trouble mocking the return value when making the GCP call, cloudStorageAdapter.SignUrl.

Can you share what you know about mocking when sending requests to GCP and receiving responses?

Many thanks

k1LoW commented 4 weeks ago

@dungtqbap Thanks for using runn.

We are still not quite sure what you want to achieve, but we will answer your question first. Unfortunately, runn does not have a mock feature. It may be necessary to incorporate another mechanism.

dungtqbap commented 4 weeks ago

@k1LoW I am using a combination of runn and wiremock to simulate the results returned when calling google's cloudStorage. Do you have an example for that, or if you have any suggestions please let me know