A service might upload an object with the Go SDK over gRPC while a separate job reads its metadata over HTTP. If each test uses its own storage stub, both can pass without proving that the reader sees the object the writer committed. On CloudBurrow’s current development branch, the built-in Cloud Storage server serves JSON, XML and gRPC on the same port against one local store. Use the transport each client actually speaks and share the bucket and object name between them. Storage compatibility notes

Check which version you are running

The v0.1.0 release uses fake-gcs-server for its JSON API coverage. The built-in server described here is on the development branch, pinned at 73443bd. To test the paths below, build from that revision and run Storage on it. Keep the release version in your test notes when comparing results. v0.1.0 Storage notes · CloudBurrow setup

Choose the path your application uses

  • JSON over HTTP fits bucket and object calls made by a JSON client. CloudBurrow documents the endpoint override for each client library. Use the JSON operation table to find the exact call your test relies on, including metadata reads and upload modes. JSON operation table
  • XML over HTTP fits clients that use the Cloud Storage XML protocol. The tested subset includes object PUT, GET and DELETE, listing with a prefix or delimiter, and resumable uploads. The XML object test writes a body with a checksum and custom metadata, then checks that a read returns both the expected body and metadata. Check the documented subset before bringing over a client that depends on additional XML operations. XML subset · XML object test
  • gRPC fits Go clients configured for the google.storage.v2 transport. The local server accepts cleartext HTTP/2 and the Go client can use the endpoint reported as STORAGE_EMULATOR_HOST_GRPC. The gRPC methods call the corresponding JSON handlers in process, so a test can inspect the same object through either client. gRPC setup and operation table

Follow a write across transports

The Go compatibility test starts with a bucket created through JSON. It writes dir/big.bin in several chunks over gRPC, then reads its attributes through JSON. The assertions compare the generation, size, checksums and a custom metadata value. The test also writes hello.txt through JSON and reads it through both gRPC read paths, checking the bytes, generation and a four-byte range. Cross-transport Go test

For your own integration test, start with the write and read your application uses. Check the object generation as well as the returned bytes, especially if later requests depend on a generation match. Keep one failure case that matters to your code. The same test rejects a bad checksum over gRPC and verifies through JSON that the rejected object is absent. That assertion checks the store after failure as well as the status returned to the writer. Cloud Storage service · Main gRPC coverage

← All articles