nouhau
nouhau copied to clipboard
GCP Test用の機能たち
WHAT
GCPのTest用の機能たちをまとめる
WHY
地味に色々あって、思い出すのが大変なので
Google Cloud Datastore
Emulator
https://cloud.google.com/datastore/docs/tools/datastore-emulator
Google Cloud SDKに含まれているDatastoreのEmulator Javaで作られている
Google Cloud Firestore
Emulator
https://firebase.google.com/docs/rules/emulator-setup https://cloud.google.com/sdk/gcloud/reference/beta/emulators/firestore/
Firebase側にはドキュメントがあるが、GCP側にはドキュメントが無い
Google Cloud SDKとしては cloud-firestore-emulator
という名前のcomponentとなっている
Google Cloud Bigtable
https://cloud.google.com/bigtable/docs/emulator
Google Cloud SDKに含まれているBigtableのEmulator https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-testing/google-cloud-bigtable-emulator にラッパーライブラリがあったりする
Google Cloud PubSub
Emulator
https://cloud.google.com/pubsub/docs/emulator
Google Cloud SDKに含まれているPubSubのEmulator
Library
https://godoc.org/cloud.google.com/go/pubsub/pstest
GoのMock用のLibrary
Google Cloud Spanner
Library
spannertest
UnitTestのために開発中のGoのLibrary まだ、未対応の機能が多い
handy-spanner
UnitTestのために開発中のGoのLibrary Unofficialで、 @kazegusuri さんが作っている
Google Cloud Spanner Emulator (β) https://cloud.google.com/spanner/docs/emulator