Skip to content

Commit

Permalink
Merge pull request #87 from unpoller/mock-types-fix
Browse files Browse the repository at this point in the history
Mocking Improvements, capture hidden bugs in unpoller
  • Loading branch information
platinummonkey committed Jul 25, 2023
2 parents 7f053ce + f15e861 commit f0fa2e6
Show file tree
Hide file tree
Showing 13 changed files with 337 additions and 192 deletions.
4 changes: 2 additions & 2 deletions events.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ type Event struct {
InnerAlertCategory string `json:"inner_alert_category"`
InnerAlertSignature string `json:"inner_alert_signature"`
Key string `json:"key" fake:"{uuid}"`
Msg string `json:"msg" fake:"{sentence:20}"`
Msg string `json:"msg" fake:"{buzzword}"`
Network string `json:"network"`
Proto string `json:"proto"`
Radio string `json:"radio"`
Expand Down Expand Up @@ -140,7 +140,7 @@ type Event struct {
// IPGeo is part of the UniFi Event data. Each event may have up to three of these.
// One for source, one for dest and one for the USG location.
type IPGeo struct {
Asn int64 `json:"asn" fake:"{address}"`
Asn int64 `json:"asn"`
Latitude float64 `json:"latitude" fake:"{latitude}"`
Longitude float64 `json:"longitude" fake:"{longitude}"`
City string `json:"city" fake:"{city}"`
Expand Down
6 changes: 3 additions & 3 deletions ids.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type IDS struct {
Archived FlexBool `json:"archived"`
DestPort int `json:"dest_port,omitempty" fake:"{port}"`
SrcPort int `json:"src_port,omitempty" fake:"{port}"`
FlowID int64 `json:"flow_id" fake:"{uuid}"`
FlowID int64 `json:"flow_id"`
InnerAlertRev int64 `json:"inner_alert_rev"`
InnerAlertSeverity int64 `json:"inner_alert_severity"`
InnerAlertGID int64 `json:"inner_alert_gid"`
Expand All @@ -34,7 +34,7 @@ type IDS struct {
InnerAlertCategory string `json:"inner_alert_category"`
InnerAlertSignature string `json:"inner_alert_signature"`
Key string `json:"key" fake:"{uuid}"`
Msg string `json:"msg" fake:"{sentence:20}"`
Msg string `json:"msg" fake:"{buzzword}"`
Proto string `json:"proto"`
SiteID string `json:"site_id" fake:"{uuid}"`
SiteName string `json:"-"`
Expand All @@ -44,7 +44,7 @@ type IDS struct {
SrcIPCountry string `json:"srcipCountry" fake:"{country}"`
SrcMAC string `json:"src_mac" fake:"{macaddress}"`
Subsystem string `json:"subsystem"`
UniqueAlertID string `json:"unique_alertid" fake:"{uuid}"`
UniqueAlertID string `json:"unique_alertid"`
USGIP string `json:"usgip" fake:"{ipv4address}"`
USGIPASN string `json:"usgipASN" fake:"{address}"`
USGIPCountry string `json:"usgipCountry" fake:"{country}"`
Expand Down
Loading

0 comments on commit f0fa2e6

Please sign in to comment.