@@ -100,7 +100,7 @@ func TestContainerPsContext(t *testing.T) {
100100 call : ctx .CreatedAt ,
101101 },
102102 {
103- container : container.Summary {Ports : []container.Port {{PrivatePort : 8080 , PublicPort : 8080 , Type : "tcp" }}},
103+ container : container.Summary {Ports : []container.PortSummary {{PrivatePort : 8080 , PublicPort : 8080 , Type : "tcp" }}},
104104 trunc : true ,
105105 expValue : "8080/tcp" ,
106106 call : ctx .Ports ,
@@ -549,7 +549,7 @@ func TestContainerBackCompat(t *testing.T) {
549549 ImageManifestDescriptor : nil ,
550550 Command : "/bin/sh" ,
551551 Created : createdAtTime .UTC ().Unix (),
552- Ports : []container.Port {{PrivatePort : 8080 , PublicPort : 8080 , Type : "tcp" }},
552+ Ports : []container.PortSummary {{PrivatePort : 8080 , PublicPort : 8080 , Type : "tcp" }},
553553 SizeRw : 123 ,
554554 SizeRootFs : 12345 ,
555555 Labels : map [string ]string {"label1" : "value1" , "label2" : "value2" },
@@ -596,14 +596,14 @@ func TestContainerBackCompat(t *testing.T) {
596596}
597597
598598type ports struct {
599- ports []container.Port
599+ ports []container.PortSummary
600600 expected string
601601}
602602
603603func TestDisplayablePorts (t * testing.T ) {
604604 cases := []ports {
605605 {
606- ports : []container.Port {
606+ ports : []container.PortSummary {
607607 {
608608 PrivatePort : 9988 ,
609609 Type : "tcp" ,
@@ -612,7 +612,7 @@ func TestDisplayablePorts(t *testing.T) {
612612 expected : "9988/tcp" ,
613613 },
614614 {
615- ports : []container.Port {
615+ ports : []container.PortSummary {
616616 {
617617 PrivatePort : 9988 ,
618618 Type : "udp" ,
@@ -621,7 +621,7 @@ func TestDisplayablePorts(t *testing.T) {
621621 expected : "9988/udp" ,
622622 },
623623 {
624- ports : []container.Port {
624+ ports : []container.PortSummary {
625625 {
626626 IP : "0.0.0.0" ,
627627 PrivatePort : 9988 ,
@@ -631,7 +631,7 @@ func TestDisplayablePorts(t *testing.T) {
631631 expected : "0.0.0.0:0->9988/tcp" ,
632632 },
633633 {
634- ports : []container.Port {
634+ ports : []container.PortSummary {
635635 {
636636 IP : "::" ,
637637 PrivatePort : 9988 ,
@@ -641,7 +641,7 @@ func TestDisplayablePorts(t *testing.T) {
641641 expected : "[::]:0->9988/tcp" ,
642642 },
643643 {
644- ports : []container.Port {
644+ ports : []container.PortSummary {
645645 {
646646 PrivatePort : 9988 ,
647647 PublicPort : 8899 ,
@@ -651,7 +651,7 @@ func TestDisplayablePorts(t *testing.T) {
651651 expected : "9988/tcp" ,
652652 },
653653 {
654- ports : []container.Port {
654+ ports : []container.PortSummary {
655655 {
656656 IP : "4.3.2.1" ,
657657 PrivatePort : 9988 ,
@@ -662,7 +662,7 @@ func TestDisplayablePorts(t *testing.T) {
662662 expected : "4.3.2.1:8899->9988/tcp" ,
663663 },
664664 {
665- ports : []container.Port {
665+ ports : []container.PortSummary {
666666 {
667667 IP : "::1" ,
668668 PrivatePort : 9988 ,
@@ -673,7 +673,7 @@ func TestDisplayablePorts(t *testing.T) {
673673 expected : "[::1]:8899->9988/tcp" ,
674674 },
675675 {
676- ports : []container.Port {
676+ ports : []container.PortSummary {
677677 {
678678 IP : "4.3.2.1" ,
679679 PrivatePort : 9988 ,
@@ -684,7 +684,7 @@ func TestDisplayablePorts(t *testing.T) {
684684 expected : "4.3.2.1:9988->9988/tcp" ,
685685 },
686686 {
687- ports : []container.Port {
687+ ports : []container.PortSummary {
688688 {
689689 IP : "::1" ,
690690 PrivatePort : 9988 ,
@@ -695,7 +695,7 @@ func TestDisplayablePorts(t *testing.T) {
695695 expected : "[::1]:9988->9988/tcp" ,
696696 },
697697 {
698- ports : []container.Port {
698+ ports : []container.PortSummary {
699699 {
700700 PrivatePort : 9988 ,
701701 Type : "udp" ,
@@ -707,7 +707,7 @@ func TestDisplayablePorts(t *testing.T) {
707707 expected : "9988/udp, 9988/udp" ,
708708 },
709709 {
710- ports : []container.Port {
710+ ports : []container.PortSummary {
711711 {
712712 IP : "1.2.3.4" ,
713713 PublicPort : 9998 ,
@@ -723,7 +723,7 @@ func TestDisplayablePorts(t *testing.T) {
723723 expected : "1.2.3.4:9998-9999->9998-9999/udp" ,
724724 },
725725 {
726- ports : []container.Port {
726+ ports : []container.PortSummary {
727727 {
728728 IP : "::1" ,
729729 PublicPort : 9998 ,
@@ -739,7 +739,7 @@ func TestDisplayablePorts(t *testing.T) {
739739 expected : "[::1]:9998-9999->9998-9999/udp" ,
740740 },
741741 {
742- ports : []container.Port {
742+ ports : []container.PortSummary {
743743 {
744744 IP : "1.2.3.4" ,
745745 PublicPort : 8887 ,
@@ -755,7 +755,7 @@ func TestDisplayablePorts(t *testing.T) {
755755 expected : "1.2.3.4:8887->9998/udp, 1.2.3.4:8888->9999/udp" ,
756756 },
757757 {
758- ports : []container.Port {
758+ ports : []container.PortSummary {
759759 {
760760 IP : "::1" ,
761761 PublicPort : 8887 ,
@@ -771,7 +771,7 @@ func TestDisplayablePorts(t *testing.T) {
771771 expected : "[::1]:8887->9998/udp, [::1]:8888->9999/udp" ,
772772 },
773773 {
774- ports : []container.Port {
774+ ports : []container.PortSummary {
775775 {
776776 PrivatePort : 9998 ,
777777 Type : "udp" ,
@@ -783,7 +783,7 @@ func TestDisplayablePorts(t *testing.T) {
783783 expected : "9998-9999/udp" ,
784784 },
785785 {
786- ports : []container.Port {
786+ ports : []container.PortSummary {
787787 {
788788 IP : "1.2.3.4" ,
789789 PrivatePort : 6677 ,
@@ -798,7 +798,7 @@ func TestDisplayablePorts(t *testing.T) {
798798 expected : "9988/udp, 1.2.3.4:7766->6677/tcp" ,
799799 },
800800 {
801- ports : []container.Port {
801+ ports : []container.PortSummary {
802802 {
803803 IP : "1.2.3.4" ,
804804 PrivatePort : 9988 ,
@@ -824,7 +824,7 @@ func TestDisplayablePorts(t *testing.T) {
824824 expected : "4.3.2.1:3322->2233/tcp, [::1]:3322->2233/tcp, 1.2.3.4:8899->9988/tcp, 1.2.3.4:8899->9988/udp" ,
825825 },
826826 {
827- ports : []container.Port {
827+ ports : []container.PortSummary {
828828 {
829829 PrivatePort : 9988 ,
830830 PublicPort : 8899 ,
@@ -844,7 +844,7 @@ func TestDisplayablePorts(t *testing.T) {
844844 expected : "9988/udp, 4.3.2.1:3322->2233/tcp, 1.2.3.4:7766->6677/tcp" ,
845845 },
846846 {
847- ports : []container.Port {
847+ ports : []container.PortSummary {
848848 {
849849 PrivatePort : 80 ,
850850 Type : "tcp" ,
0 commit comments