discentem / cavorite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Find a way to integration test GCS

discentem opened this issue · comments

commented

we have minio for s3 but it's been hard to find something for GCS.

Maybe https://github.com/oittaa/gcp-storage-emulator?

I like this example the best: https://github.com/oittaa/gcp-storage-emulator. It is a simple binary that appears to just mock GCS calls which is sufficient for integration testing the functions we have.

commented

I think I personally prefer fsouza/fake-gcs-server as it can be used as a go library (and therefore unit tests): https://github.com/fsouza/fake-gcs-server/blob/v1.45.1/fakestorage/server_test.go#L233

commented

I've added unit tests here: #105

fake-gcs-server also provides a docker container so we can use that for integration tests