MCPcopy Create free account
hub / github.com/activecm/rita / TestHTTPProtoTable

Method TestHTTPProtoTable

integration/analysis_view_test.go:583–775  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

581}
582
583func (it *ValidDatasetTestSuite) TestHTTPProtoTable() {
584
585 type protoInfo struct {
586 Useragent string `ch:"useragent"`
587 Method string `ch:"method"`
588 Referrer string `ch:"referrer"`
589 URI string `ch:"uri"`
590 DstMimeTypes []string `ch:"dst_mime_types"`
591 Count uint64 `ch:"count"`
592 }
593
594 tests := []struct {
595 name string
596 src string
597 fqdn string
598 protoInfoList []protoInfo
599 }{
600 {
601 name: "Single Entry",
602 src: "10.55.100.104",
603 fqdn: "cdn.taboola.com",
604 protoInfoList: []protoInfo{
605 {
606 Useragent: "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko",
607 Method: "GET",
608 URI: "/libtrc/businessinsider/loader.js",
609 Referrer: "http://www.businessinsider.com/",
610 DstMimeTypes: []string{"text/plain"},
611 Count: 16,
612 },
613 },
614 },
615
616 {
617 name: "Multiple Entries",
618 src: "10.55.100.107",
619 fqdn: "www.google.com",
620 protoInfoList: []protoInfo{
621 {
622 Useragent: "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko",
623 Method: "GET",
624 URI: "/ads/user-lists/863238793/?guid=ON&script=0&cdct=2&is_vtc=1&random=2136862691",
625 Referrer: "http://www.fedex.com/",
626 DstMimeTypes: []string{"image/gif"},
627 Count: 1,
628 },
629 {
630 Useragent: "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko",
631 Method: "GET",
632 URI: "/ads/user-lists/863238793/?guid=ON&script=0&cdct=2&is_vtc=1&random=3719609297",
633 Referrer: "http://www.fedex.com/",
634 DstMimeTypes: []string{"image/gif"},
635 Count: 1,
636 },
637 {
638 Useragent: "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko",
639 Method: "GET",
640 URI: "/ads/user-lists/863238793/?guid=ON&script=0&cdct=2&is_vtc=1&random=4251233521",

Callers

nothing calls this directly

Calls 3

NewFixedStringHashFunction · 0.92
StringMethod · 0.80
HexMethod · 0.80

Tested by

no test coverage detected