Update regex file for es user agent node processor (#59697)

This commit is contained in:
Shahzad 2020-07-17 16:54:34 +02:00 committed by GitHub
parent 3cef12368c
commit 24e5da7851
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 555 additions and 365 deletions

View file

@ -66,7 +66,7 @@ Which returns
"full": "Mac OS X 10.10.5" "full": "Mac OS X 10.10.5"
}, },
"device" : { "device" : {
"name" : "Other" "name" : "Mac"
}, },
} }
} }

File diff suppressed because it is too large Load diff

View file

@ -111,7 +111,7 @@ public class UserAgentProcessorTests extends ESTestCase {
os.put("full", "Mac OS X 10.9.2"); os.put("full", "Mac OS X 10.9.2");
assertThat(target.get("os"), is(os)); assertThat(target.get("os"), is(os));
Map<String, String> device = new HashMap<>(); Map<String, String> device = new HashMap<>();
device.put("name", "Other"); device.put("name", "Mac");
assertThat(target.get("device"), is(device)); assertThat(target.get("device"), is(device));
} }

View file

@ -32,7 +32,7 @@
- match: { _source.user_agent.original: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.149 Safari/537.36" } - match: { _source.user_agent.original: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.149 Safari/537.36" }
- match: { _source.user_agent.os: {"name":"Mac OS X", "version":"10.9.2", "full":"Mac OS X 10.9.2"} } - match: { _source.user_agent.os: {"name":"Mac OS X", "version":"10.9.2", "full":"Mac OS X 10.9.2"} }
- match: { _source.user_agent.version: "33.0.1750.149" } - match: { _source.user_agent.version: "33.0.1750.149" }
- match: { _source.user_agent.device: {"name": "Other" }} - match: { _source.user_agent.device: {"name": "Mac" }}
--- ---
"Test user agent processor with parameters": "Test user agent processor with parameters":