fluent-plugin-path2tag 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -4
- data/lib/fluent/plugin/out_path2tag.rb +1 -1
- data/lib/fluent/plugin/path2tag/version.rb +1 -1
- data/test/plugin/test_path2tag.rb +9 -9
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a962ab26aa24ec0b5d52fd974d270ab4a31d5b75
|
4
|
+
data.tar.gz: ac7c9ffd2c91de379bfc54f1dd3eacf2f40fb24b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8956663b1d886c1a9fb6a500d5c133f6b5b3dac0aae25a9d049ab9565631fb84dbfcdf9570535696f90c668ccbc48fb27871348174eb61c636d486fdbcf0de08
|
7
|
+
data.tar.gz: 3c49c6bbaef94488c9fdfd7cab02caffb1393e2a17cb92ef8314862d7813c3b817d5f2b3b7f6cd29b5c5f6375cc3a99d889cecf4794143a0065b6cffd7c1d165
|
data/README.md
CHANGED
@@ -50,7 +50,7 @@ class Path2tagTest < Test::Unit::TestCase
|
|
50
50
|
|
51
51
|
def test_emit_ok
|
52
52
|
d1 = create_driver(CONFIG_OK, 'nginx.access')
|
53
|
-
body = '
|
53
|
+
body = '{"fluentd_time":"2017-02-20 10:39:14 UTC","unique_id":"123ABC","device_token":"ABC123"}'
|
54
54
|
d1.run do
|
55
55
|
d1.emit({'request_uri' => '/path/foo/bar', 'request_body' => body})
|
56
56
|
end
|
@@ -62,7 +62,7 @@ class Path2tagTest < Test::Unit::TestCase
|
|
62
62
|
|
63
63
|
def test_emit_no_path_key
|
64
64
|
d1 = create_driver(CONFIG_NO_PATH_KEY, 'nginx.access')
|
65
|
-
body = '
|
65
|
+
body = '{"fluentd_time":"2017-02-20 10:39:14 UTC","unique_id":"123ABC","device_token":"ABC123"}'
|
66
66
|
d1.run do
|
67
67
|
d1.emit({'request_uri' => '/path/foo/bar', 'request_body' => body})
|
68
68
|
end
|
@@ -72,7 +72,7 @@ class Path2tagTest < Test::Unit::TestCase
|
|
72
72
|
|
73
73
|
def test_emit_no_data_key
|
74
74
|
d1 = create_driver(CONFIG_NO_DATA_KEY, 'nginx.access')
|
75
|
-
body = '
|
75
|
+
body = '{"fluentd_time":"2017-02-20 10:39:14 UTC","unique_id":"123ABC","device_token":"ABC123"}'
|
76
76
|
d1.run do
|
77
77
|
d1.emit({'request_uri' => '/path/foo/bar', 'request_body' => body})
|
78
78
|
end
|
@@ -82,7 +82,7 @@ class Path2tagTest < Test::Unit::TestCase
|
|
82
82
|
|
83
83
|
def test_emit_path_format_1
|
84
84
|
d1 = create_driver(CONFIG_OK, 'nginx.access')
|
85
|
-
body = '
|
85
|
+
body = '{"fluentd_time":"2017-02-20 10:39:14 UTC","unique_id":"123ABC","device_token":"ABC123"}'
|
86
86
|
d1.run do
|
87
87
|
d1.emit({'request_uri' => '/path/foo/bar', 'request_body' => body})
|
88
88
|
end
|
@@ -94,7 +94,7 @@ class Path2tagTest < Test::Unit::TestCase
|
|
94
94
|
|
95
95
|
def test_emit_path_format_2
|
96
96
|
d1 = create_driver(CONFIG_OK, 'nginx.access')
|
97
|
-
body = '
|
97
|
+
body = '{"fluentd_time":"2017-02-20 10:39:14 UTC","unique_id":"123ABC","device_token":"ABC123"}'
|
98
98
|
d1.run do
|
99
99
|
d1.emit({'request_uri' => 'path/foo/bar', 'request_body' => body})
|
100
100
|
end
|
@@ -106,7 +106,7 @@ class Path2tagTest < Test::Unit::TestCase
|
|
106
106
|
|
107
107
|
def test_emit_path_format_3
|
108
108
|
d1 = create_driver(CONFIG_OK, 'nginx.access')
|
109
|
-
body = '
|
109
|
+
body = '{"fluentd_time":"2017-02-20 10:39:14 UTC","unique_id":"123ABC","device_token":"ABC123"}'
|
110
110
|
d1.run do
|
111
111
|
d1.emit({'request_uri' => '/path/foo/bar/', 'request_body' => body})
|
112
112
|
end
|
@@ -118,7 +118,7 @@ class Path2tagTest < Test::Unit::TestCase
|
|
118
118
|
|
119
119
|
def test_emit_path_format_4
|
120
120
|
d1 = create_driver(CONFIG_OK, 'nginx.access')
|
121
|
-
body = '
|
121
|
+
body = '{"fluentd_time":"2017-02-20 10:39:14 UTC","unique_id":"123ABC","device_token":"ABC123"}'
|
122
122
|
d1.run do
|
123
123
|
d1.emit({'request_uri' => 'path', 'request_body' => body})
|
124
124
|
end
|
@@ -130,14 +130,14 @@ class Path2tagTest < Test::Unit::TestCase
|
|
130
130
|
|
131
131
|
def test_emit_json_parse
|
132
132
|
d1 = create_driver(CONFIG_OK, 'nginx.access')
|
133
|
-
body = '{"fluentd_time":"2017-02-20 10:39:14 UTC","unique_id":"123ABC","device_token":"ABC123"}'
|
133
|
+
body = '[{"fluentd_time":"2017-02-20 10:39:14 UTC","unique_id":"123ABC","device_token":"ABC123"}]'
|
134
134
|
d1.run do
|
135
135
|
d1.emit({'request_uri' => 'path/foo/bar', 'request_body' => body})
|
136
136
|
end
|
137
137
|
emits = d1.emits
|
138
138
|
assert_equal 1, emits.length
|
139
139
|
assert_equal 'path.foo.bar', emits[0][0]
|
140
|
-
assert_equal JSON.parse(
|
140
|
+
assert_equal JSON.parse('{"fluentd_time":"2017-02-20 10:39:14 UTC","unique_id":"123ABC","device_token":"ABC123"}'), emits[0][2]
|
141
141
|
end
|
142
142
|
|
143
143
|
def test_emit_json_parse_2
|