(t *testing.T)
| 593 | } |
| 594 | |
| 595 | func (s) TestGetSocket(t *testing.T) { |
| 596 | ss := []*channelz.Socket{newSocket(czSocket{ |
| 597 | streamsStarted: 10, |
| 598 | streamsSucceeded: 2, |
| 599 | streamsFailed: 3, |
| 600 | messagesSent: 20, |
| 601 | messagesReceived: 10, |
| 602 | keepAlivesSent: 2, |
| 603 | lastLocalStreamCreatedTimestamp: time.Unix(0, 0), |
| 604 | lastRemoteStreamCreatedTimestamp: time.Unix(1, 0), |
| 605 | lastMessageSentTimestamp: time.Unix(2, 0), |
| 606 | lastMessageReceivedTimestamp: time.Unix(3, 0), |
| 607 | localFlowControlWindow: 65536, |
| 608 | remoteFlowControlWindow: 1024, |
| 609 | localAddr: &net.TCPAddr{IP: netip.MustParseAddr("1.0.0.1").AsSlice(), Port: 10001}, |
| 610 | remoteAddr: &net.TCPAddr{IP: netip.MustParseAddr("12.0.0.1").AsSlice(), Port: 10002}, |
| 611 | remoteName: "remote.remote", |
| 612 | }), newSocket(czSocket{ |
| 613 | streamsStarted: 10, |
| 614 | streamsSucceeded: 2, |
| 615 | streamsFailed: 3, |
| 616 | messagesSent: 20, |
| 617 | messagesReceived: 10, |
| 618 | keepAlivesSent: 2, |
| 619 | lastLocalStreamCreatedTimestamp: time.Unix(0, 0), |
| 620 | lastRemoteStreamCreatedTimestamp: time.Unix(5, 0), |
| 621 | lastMessageSentTimestamp: time.Unix(6, 0), |
| 622 | lastMessageReceivedTimestamp: time.Unix(7, 0), |
| 623 | localFlowControlWindow: 65536, |
| 624 | remoteFlowControlWindow: 1024, |
| 625 | localAddr: &net.UnixAddr{Name: "file.path", Net: "unix"}, |
| 626 | remoteAddr: &net.UnixAddr{Name: "another.path", Net: "unix"}, |
| 627 | remoteName: "remote.remote", |
| 628 | }), newSocket(czSocket{ |
| 629 | streamsStarted: 5, |
| 630 | streamsSucceeded: 2, |
| 631 | streamsFailed: 3, |
| 632 | messagesSent: 20, |
| 633 | messagesReceived: 10, |
| 634 | keepAlivesSent: 2, |
| 635 | lastLocalStreamCreatedTimestamp: time.Unix(10, 10), |
| 636 | lastRemoteStreamCreatedTimestamp: time.Unix(0, 0), |
| 637 | lastMessageSentTimestamp: time.Unix(0, 0), |
| 638 | lastMessageReceivedTimestamp: time.Unix(0, 0), |
| 639 | localFlowControlWindow: 65536, |
| 640 | remoteFlowControlWindow: 10240, |
| 641 | localAddr: &net.IPAddr{IP: netip.MustParseAddr("1.0.0.1").AsSlice()}, |
| 642 | remoteAddr: &net.IPAddr{IP: netip.MustParseAddr("9.0.0.1").AsSlice()}, |
| 643 | remoteName: "", |
| 644 | }), newSocket(czSocket{ |
| 645 | localAddr: &net.TCPAddr{IP: netip.MustParseAddr("127.0.0.1").AsSlice(), Port: 10001}, |
| 646 | }), newSocket(czSocket{ |
| 647 | security: &credentials.TLSChannelzSecurityValue{ |
| 648 | StandardName: "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", |
| 649 | RemoteCertificate: []byte{48, 130, 2, 156, 48, 130, 2, 5, 160}, |
| 650 | }, |
| 651 | }), newSocket(czSocket{ |
| 652 | security: &credentials.OtherChannelzSecurityValue{ |
nothing calls this directly
no test coverage detected