Skip to content

Commit

Permalink
Adjust tests
Browse files Browse the repository at this point in the history
  • Loading branch information
absorbb committed Aug 9, 2022
1 parent 374f58b commit 3038533
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
22 changes: 14 additions & 8 deletions server/enrichment/default_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,13 @@ func TestDefault(t *testing.T) {
"zip": "14101",
},
"parsed_ua": map[string]interface{}{
"os_family": "Mac OS X",
"os_version": "10.15.5",
"ua_family": "Chrome",
"ua_version": "83.0.4103",
"device_brand": "Apple",
"device_family": "Mac",
"device_model": "Mac",
"os_family": "Mac OS X",
"os_version": "10.15.5",
"ua_family": "Chrome",
"ua_version": "83.0.4103",
},
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36",
},
Expand All @@ -96,10 +99,13 @@ func TestDefault(t *testing.T) {
"zip": "14101",
},
"parsed_ua": map[string]interface{}{
"os_family": "Mac OS X",
"os_version": "10.15.5",
"ua_family": "Chrome",
"ua_version": "83.0.4103",
"device_brand": "Apple",
"device_family": "Mac",
"device_model": "Mac",
"os_family": "Mac OS X",
"os_version": "10.15.5",
"ua_family": "Chrome",
"ua_version": "83.0.4103",
},
"source_ip": "10.10.10.10",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36",
Expand Down
2 changes: 1 addition & 1 deletion server/useragent/resolver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func TestResolve(t *testing.T) {
{
"Ok resolved ua from browser",
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36",
&ResolvedUa{UaFamily: "Chrome", UaVersion: "83.0.4103", OsFamily: "Mac OS X", OsVersion: "10.15.5"},
&ResolvedUa{UaFamily: "Chrome", UaVersion: "83.0.4103", OsFamily: "Mac OS X", OsVersion: "10.15.5", DeviceFamily: "Mac", DeviceBrand: "Apple", DeviceModel: "Mac"},
},
}
uaResolver := NewResolver()
Expand Down

0 comments on commit 3038533

Please sign in to comment.