diff --git a/detectors/gcp/cloud-run.go b/detectors/gcp/cloud-run.go index 78757dae195..685c5c54355 100644 --- a/detectors/gcp/cloud-run.go +++ b/detectors/gcp/cloud-run.go @@ -28,6 +28,8 @@ import ( const serviceNamespace = "cloud-run-managed" +// The minimal list of metadata.Client methods we use. Use an interface so we +// can replace it with a fake implementation in the unit test. type metadataClient interface { ProjectID() (string, error) Get(string) (string, error)