summaryrefslogtreecommitdiff
path: root/test/src/gtest_fieldstat.cpp
diff options
context:
space:
mode:
authorfumingwei <[email protected]>2023-03-28 19:06:49 +0800
committerfumingwei <[email protected]>2023-03-28 19:06:49 +0800
commit1e22236b3fdce7446422fedb03594cf09c3d4cfb (patch)
treeba2f884e6a9b9ad39cc255f1445b0492ad8b7553 /test/src/gtest_fieldstat.cpp
parent1b65cc6b0cabca68f7e731a5d201dc1071bbd48d (diff)
bugfix:1.将MESA_field_stat2改为fieldstat3 2.修复develop分支编译失败问题v3.0.1refactor-fieldstat3
Diffstat (limited to 'test/src/gtest_fieldstat.cpp')
-rw-r--r--test/src/gtest_fieldstat.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/test/src/gtest_fieldstat.cpp b/test/src/gtest_fieldstat.cpp
index 609853e..6683a31 100644
--- a/test/src/gtest_fieldstat.cpp
+++ b/test/src/gtest_fieldstat.cpp
@@ -15,22 +15,17 @@ TEST(FeildStatAPI, FieldStatInstanceNew)
fieldstat_instance_free(instance);
}
-/*
+
TEST(FeildStatAPI, FieldStatEnablePrometheusEndpoint)
{
- int ret_enable_prometheus_endpoint = 0;
- int ret_req_prometheus_endpoint = 0;
- const char *request_cmd = "curl -s -o /dev/null http://127.0.0.1:9020/metrics";
+ int ret = 0;
- ret_enable_prometheus_endpoint = fieldstat_global_enable_prometheus_endpoint(9020, "/metrcis");
- EXPECT_EQ(0, ret_enable_prometheus_endpoint);
- usleep(500 * 1000);
- ret_req_prometheus_endpoint = system(request_cmd);
- EXPECT_EQ(0,ret_req_prometheus_endpoint);
+ ret = fieldstat_global_enable_prometheus_endpoint(9020, "/metrcis");
+ EXPECT_EQ(0, ret);
usleep(500 * 1000);
fieldstat_global_disable_prometheus_endpoint();
}
-*/
+
TEST(FeildStatAPI, FieldStatSetPrometheusOutput)
{
struct fieldstat_instance *instance = NULL;