summaryrefslogtreecommitdiffstats
path: root/src/fluent-bit/tests/runtime/data/stackdriver/stackdriver_test_timestamp.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 12:08:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 12:08:18 +0000
commit5da14042f70711ea5cf66e034699730335462f66 (patch)
tree0f6354ccac934ed87a2d555f45be4c831cf92f4a /src/fluent-bit/tests/runtime/data/stackdriver/stackdriver_test_timestamp.h
parentReleasing debian version 1.44.3-2. (diff)
downloadnetdata-5da14042f70711ea5cf66e034699730335462f66.tar.xz
netdata-5da14042f70711ea5cf66e034699730335462f66.zip
Merging upstream version 1.45.3+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/fluent-bit/tests/runtime/data/stackdriver/stackdriver_test_timestamp.h')
-rw-r--r--src/fluent-bit/tests/runtime/data/stackdriver/stackdriver_test_timestamp.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/src/fluent-bit/tests/runtime/data/stackdriver/stackdriver_test_timestamp.h b/src/fluent-bit/tests/runtime/data/stackdriver/stackdriver_test_timestamp.h
new file mode 100644
index 000000000..f80cc37d6
--- /dev/null
+++ b/src/fluent-bit/tests/runtime/data/stackdriver/stackdriver_test_timestamp.h
@@ -0,0 +1,62 @@
+/* timestamp after parsing: 2020-07-21T16:40:42.000012345Z */
+#define TIMESTAMP_FORMAT_OBJECT_COMMON_CASE "[" \
+ "1591111124," \
+ "{" \
+ "\"timestamp\": " \
+ "{" \
+ "\"seconds\": \"1595349642\"," \
+ "\"nanos\": \"12345\"" \
+ "}" \
+ "}]"
+
+/* "1595349600" in RFC3339 format: 2020-07-21T16:40:00Z */
+#define TIMESTAMP_FORMAT_OBJECT_NOT_A_MAP "[" \
+ "1595349600," \
+ "{" \
+ "\"timestamp\": \"string\"" \
+ "}]"
+
+/* "1595349600" in RFC3339 format: 2020-07-21T16:40:00Z */
+#define TIMESTAMP_FORMAT_OBJECT_MISSING_SUBFIELD "[" \
+ "1595349600," \
+ "{" \
+ "\"timestamp\": " \
+ "{" \
+ "\"nanos\": \"12345\"" \
+ "}" \
+ "}]"
+
+/* "1595349600" in RFC3339 format: 2020-07-21T16:40:00Z */
+#define TIMESTAMP_FORMAT_OBJECT_INCORRECT_TYPE_SUBFIELDS "[" \
+ "1595349600," \
+ "{" \
+ "\"timestamp\": " \
+ "{" \
+ "\"seconds\": \"string\"," \
+ "\"nanos\": true" \
+ "}" \
+ "}]"
+
+
+/* timestamp after parsing: 2020-07-21T16:40:42.000012345Z */
+#define TIMESTAMP_FORMAT_DUO_FIELDS_COMMON_CASE "[" \
+ "1595349600," \
+ "{" \
+ "\"timestampSeconds\": \"1595349642\"," \
+ "\"timestampNanos\": \"12345\"" \
+ "}]"
+
+/* "1595349600" in RFC3339 format: 2020-07-21T16:40:00Z */
+#define TIMESTAMP_FORMAT_DUO_FIELDS_MISSING_NANOS "[" \
+ "1595349600," \
+ "{" \
+ "\"timestampSeconds\": \"1595349642\"" \
+ "}]"
+
+/* "1595349600" in RFC3339 format: 2020-07-21T16:40:00Z */
+#define TIMESTAMP_FORMAT_DUO_FIELDS_INCORRECT_TYPE "[" \
+ "1595349600," \
+ "{" \
+ "\"timestampSeconds\": \"string\"," \
+ "\"timestampNanos\": true" \
+ "}]"