diff --git a/plugins/out_stackdriver/gce_metadata.c b/plugins/out_stackdriver/gce_metadata.c index 78c765586d9..9d86ad2e25d 100644 --- a/plugins/out_stackdriver/gce_metadata.c +++ b/plugins/out_stackdriver/gce_metadata.c @@ -44,7 +44,7 @@ static int fetch_metadata(struct flb_stackdriver *ctx, /* If runtime test mode is enabled, add test data */ if (ctx->ins->test_mode == FLB_TRUE) { if (strcmp(uri, FLB_STD_METADATA_PROJECT_ID_URI) == 0) { - flb_sds_cat(payload, "111222333", 9); + flb_sds_cat(payload, "fluent-bit-test", 9); return 0; } else if (strcmp(uri, FLB_STD_METADATA_ZONE_URI) == 0) { diff --git a/plugins/out_stackdriver/gce_metadata.h b/plugins/out_stackdriver/gce_metadata.h index 42bcc972a5a..3e9860c7bbc 100644 --- a/plugins/out_stackdriver/gce_metadata.h +++ b/plugins/out_stackdriver/gce_metadata.h @@ -23,7 +23,7 @@ #include "stackdriver.h" /* Project ID metadata URI */ -#define FLB_STD_METADATA_PROJECT_ID_URI "/computeMetadata/v1/project/numeric-project-id" +#define FLB_STD_METADATA_PROJECT_ID_URI "/computeMetadata/v1/project/project-id" /* Zone metadata URI */ #define FLB_STD_METADATA_ZONE_URI "/computeMetadata/v1/instance/zone" diff --git a/tests/runtime/out_stackdriver.c b/tests/runtime/out_stackdriver.c index a2f364cc84e..56a628849a4 100644 --- a/tests/runtime/out_stackdriver.c +++ b/tests/runtime/out_stackdriver.c @@ -313,7 +313,7 @@ static void cb_check_gce_instance(void *ctx, int ffd, /* project id */ ret = mp_kv_cmp(res_data, res_size, - "$resource['labels']['project_id']", "111222333"); + "$resource['labels']['project_id']", "fluent-bit-test"); TEST_CHECK(ret == FLB_TRUE); /* zone */