From e91c0eff42fb7b0c3bda5f84f53e14eba703abb3 Mon Sep 17 00:00:00 2001 From: Hiroshi Hatake Date: Wed, 24 Apr 2024 15:56:08 +0900 Subject: [PATCH] decoding: test: Use the actual payloads of prometheus remote write Signed-off-by: Hiroshi Hatake --- ...ite_dump_originally_from_node_exporter.bin | Bin 0 -> 293512 bytes tests/decoding.c | 71 +----------------- 2 files changed, 2 insertions(+), 69 deletions(-) create mode 100644 tests/data/remote_write_dump_originally_from_node_exporter.bin diff --git a/tests/data/remote_write_dump_originally_from_node_exporter.bin b/tests/data/remote_write_dump_originally_from_node_exporter.bin new file mode 100644 index 0000000000000000000000000000000000000000..7f8afe3cbb3bcd4be2fbc58765d0d60c04e0ff65 GIT binary patch literal 293512 zcmdU&3!EEex&O1h@3gc_T4;e5wp#Y%Uwg z$?zAlQdCLB;2)Hnm=N|6ro^OSIV$-lW@7__UzjeXhUJWsN=m7meRK5(dF{3pR$Fzg-FDKNz?RNXIM~y9nvJanIzz#M-p-{`r;V*{t!^tu(b4=!^QxAm zCZ7rj^NUuRz3!wftJg=sqx$Q1Ke6aa{=QQ;YzlRDgBJ!*hab3V?MdKhnm73aqu{T>u3*o=Ku8RCMLX4uU+PP@ zIj|2+2QBuQUW~a3!ERwe(Li&yuIh_yT@?zfUa@%_gx01N{VP>3t7f5Yu#hF-x`K-X zD^_*|%>lP{Rmax86{oK_p|>Xx=n9vZC@e`qG2Y!X(A{MhZca=@Q|AgM>I_*TEwxH5 z6~T)lo7SJw9|^(OgDO?G68MwVN~dfJcLlK-)bSO`_HkK z2n$1m<+B4F5Nv_Pp=IDS9oc9W1bvzIA8XY0hP#3`-5!BRG_qEkDQhW_lrqAdxBOUq zI&7Gl0*r>UGa%Yp?@AvhJbR~M9}*2Q zQrcRd_>uZ6z+)S72>tN()!%sYpGl;-fHG2CA$3Cwq#q+iEGiGF5lJ2#%1N=3bsqlM zI$+YNGdmu524jm0jUmY9KL0;|?N8i{LwBuPtMNwL`kqTyocWvQ&|*AT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&kU8H&)qmjd*9mBbkHlLG;!!7XQqw{v}4b*yxK))ieY28$G%Ny+uV-1bK zo##k&NKR`X+EZ_8PE!BLFR0hwBibE!_-0Wn{tf>m_4jOVq&j3XUte&`7Hj|;T&*ZS z#8zgvgLJ#iPA9}1jAAkpRWedeN~R+L^%V%ifYXY9z-`3ZKo{ts`{jn<7K@mO6#sj- zl9B@Ov1SwM6fv5XbGx}gzgUw+tAYmMBV{JgR(T{bBFE*3{q=f+XF|q2%=Bo*TiFm*?oTuCUwo> z-M7d)tzScI50>KU*ZM8Xo8G|XYz-azDSv^Q|$*5nPar&Cj`Rm}|~ zk(gBsx+#5-ZQ28+K5Q3q|Iu{nwj%XZjXGFn>@J%dj^4xWF12>|-hdq{bCRCD0y|u4 z?WKDKw)z;CC28AzPWJ0w3rYCAENs8%wZ;^!)(F^`+k4!dW!!c}lJ~g7W!!es?LF?U zGH$!F$$Q-0W!&Mt!oPdUxb1SK_w2p2jN2|*dXKxejN2|-dae*GOO|^@REE_L+gr1a zU6S{lmxP05+6&|Z<{!(~}MWS8YV7nNnTpk2;^_a&M?f{6XUtMOf&r zG`gCFqEaF&=k1r_d2Q6zdee>Y>-nYl1hZGz)XLYZY-%3WzHy#d$6z;ZH`Cc(UE?`6 zbxbw8d5{gq^i^X_;Rs(%aazx%y%JF?ZZsQ%duP)jOUpH*d{~7p=sij!b$OZ6SOD-c zr7^MaGNn;yt@f~A8dG^MQyLR@FH;)RbT3ol^mfe4(Sws&6Q$=8WG~^xS|OnWwL)>Hi;E!{?y@ literal 0 HcmV?d00001 diff --git a/tests/decoding.c b/tests/decoding.c index 69db52b..358ca53 100644 --- a/tests/decoding.c +++ b/tests/decoding.c @@ -123,59 +123,6 @@ static struct cmt *generate_encoder_test_data() return cmt; } -static struct cmt *generate_encoder_test_basic_data() -{ - double val; - struct cmt *cmt; - uint64_t ts; - struct cmt_gauge *g1; - struct cmt_counter *c1; - struct cmt_untyped *u1; - - /* Use the current timestamp because there is cut off. */ - ts = cfl_time_now(); - cmt = cmt_create(); - - c1 = cmt_counter_create(cmt, "kubernetes", "network", "load_counter", "Network load counter", - 2, (char *[]) {"hostname", "app"}); - - cmt_counter_get_val(c1, 0, NULL, &val); - cmt_counter_inc(c1, ts, 0, NULL); - cmt_counter_add(c1, ts, 2, 0, NULL); - cmt_counter_get_val(c1, 0, NULL, &val); - - cmt_counter_inc(c1, ts, 2, (char *[]) {"localhost", "cmetrics"}); - cmt_counter_get_val(c1, 2, (char *[]) {"localhost", "cmetrics"}, &val); - cmt_counter_add(c1, ts, 10.55, 2, (char *[]) {"localhost", "test"}); - cmt_counter_get_val(c1, 2, (char *[]) {"localhost", "test"}, &val); - cmt_counter_set(c1, ts, 12.15, 2, (char *[]) {"localhost", "test"}); - cmt_counter_set(c1, ts, 1, 2, (char *[]) {"localhost", "test"}); - - g1 = cmt_gauge_create(cmt, "kubernetes", "network", "load_gauge", "Network load gauge", 0, NULL); - - cmt_gauge_get_val(g1, 0, NULL, &val); - cmt_gauge_set(g1, ts, 2.0, 0, NULL); - cmt_gauge_get_val(g1, 0, NULL, &val); - cmt_gauge_inc(g1, ts, 0, NULL); - cmt_gauge_get_val(g1, 0, NULL, &val); - cmt_gauge_sub(g1, ts, 2, 0, NULL); - cmt_gauge_get_val(g1, 0, NULL, &val); - cmt_gauge_dec(g1, ts, 0, NULL); - cmt_gauge_get_val(g1, 0, NULL, &val); - cmt_gauge_inc(g1, ts, 0, NULL); - - u1 = cmt_untyped_create(cmt, "kubernetes", "network", "load", "Network load", - 2, (char *[]) {"hostname", "app"}); - - cmt_untyped_set(u1, ts, 2, 0, NULL); - cmt_untyped_get_val(u1, 2, (char *[]) {"localhost", "cmetrics"}, &val); - cmt_untyped_get_val(u1, 2, (char *[]) {"localhost", "test"}, &val); - cmt_untyped_set(u1, ts, 12.15, 2, (char *[]) {"localhost", "test"}); - cmt_untyped_set(u1, ts, 1, 2, (char *[]) {"localhost", "test"}); - - return cmt; -} - void test_opentelemetry() { cfl_sds_t reference_prometheus_context; @@ -237,31 +184,17 @@ void test_opentelemetry() void test_prometheus_remote_write() { int ret; - cfl_sds_t payload; struct cmt *decoded_context; - struct cmt *cmt; + cfl_sds_t payload = read_file(CMT_TESTS_DATA_PATH "/remote_write_dump_originally_from_node_exporter.bin"); cmt_initialize(); - cmt = generate_encoder_test_basic_data(); - TEST_CHECK(cmt != NULL); - - payload = cmt_encode_prometheus_remote_write_create(cmt); - TEST_CHECK(payload != NULL); - - if (payload == NULL) { - cmt_destroy(cmt); - - return; - } - ret = cmt_decode_prometheus_remote_write_create(&decoded_context, payload, cfl_sds_len(payload)); TEST_CHECK(ret == CMT_DECODE_PROMETHEUS_REMOTE_WRITE_SUCCESS); - cmt_encode_prometheus_remote_write_destroy(payload); cmt_decode_prometheus_remote_write_destroy(decoded_context); - cmt_destroy(cmt); + cfl_sds_destroy(payload); }