An event test should show that the work finished. In CloudBurrow’s acceptance test, an object goes into Cloud Storage, a Pub/Sub message reaches a worker running as a Cloud Run service, and a result comes back out of Storage. The assertion checks the result’s contents, so a successful publish alone cannot pass the test.

Follow the object through the worker

The test starts by uploading input.txt with the official Go Storage client. It builds the worker image, loads it into kind and deploys the worker with a Knative Service manifest. The worker gets the cluster’s Storage address because its loopback address belongs to its own pod. Pinned acceptance test.

Once the worker is ready, the test uses the official Go Pub/Sub client to create a topic and a push subscription. The subscription targets the worker’s cluster-local address. The test publishes the object name after the upload. When the push arrives, the worker reads the input through the official Storage client and writes result.txt. The test polls Storage within a fixed deadline and checks that the result contains the uppercase version of the input. Pinned worker source.

This gives you a pattern to use in your own suite. Create the input, send a message with a specific reference and wait for a result you can inspect. When it fails, the step where it stopped helps you narrow the problem to upload, delivery, worker execution or output.

If your workflow uses automatic bucket notifications, test that path separately. The v0.1.0 compatibility suite configures a notification, uploads an object and checks the resulting OBJECT_FINALIZE event. Pinned notification test.

Pin the action and the CLI separately

The action revision selects the setup and cleanup code. The version input selects the CloudBurrow binary. For example, after your job installs kind and kubectl on a Docker runner, this step uses the current pinned action with the published v0.1.0 CLI.

- uses: cloudburrow/cloudburrow@73443bd32ae89248c486e70b607f1f928e5122b6
  with:
    version: v0.1.0
    services: storage,pubsub,run

The action checks the installed CLI version before passing flags. A job using the v0.1.0 binary gets that release’s feature set. The port-base input needs a newer CLI. Jobs sharing a runner need separate port ranges as well as distinct instance names. To exercise features from the action’s source checkout, choose version: source and prepare the build tools described in the guide. Pinned action version guide.

The action exports the local endpoints to later job steps. Use the endpoint from the job environment for SDK calls on the runner. Give any worker inside the cluster the address it can reach from its pod. If a run fails, collect the diagnostics before the job’s cleanup step deletes its cluster. The CI setup page has the full workflow and a shell recipe. Pinned diagnostics guide.

Read the evidence for the path you use

The acceptance shard on main checks that the named test actually passed. The worker setup uses Kubernetes, and the separate Cloud Run compatibility tests exercise API operations through the official Go client. Check the release and main columns in the compatibility matrix when you add an operation to your workflow. Pinned CI workflow, pinned Cloud Run client tests.

← All articles