@@ -137,7 +137,7 @@ func TestContainerPsContext(t *testing.T) {
137137 call : ctx .CreatedAt ,
138138 },
139139 {
140- container : container.Summary {Ports : []container.Port {{PrivatePort : 8080 , PublicPort : 8080 , Type : "tcp" }}},
140+ container : container.Summary {Ports : []container.PortSummary {{PrivatePort : 8080 , PublicPort : 8080 , Type : "tcp" }}},
141141 trunc : true ,
142142 expValue : "8080/tcp" ,
143143 call : ctx .Ports ,
@@ -586,7 +586,7 @@ func TestContainerBackCompat(t *testing.T) {
586586 ImageManifestDescriptor : nil ,
587587 Command : "/bin/sh" ,
588588 Created : createdAtTime .UTC ().Unix (),
589- Ports : []container.Port {{PrivatePort : 8080 , PublicPort : 8080 , Type : "tcp" }},
589+ Ports : []container.PortSummary {{PrivatePort : 8080 , PublicPort : 8080 , Type : "tcp" }},
590590 SizeRw : 123 ,
591591 SizeRootFs : 12345 ,
592592 Labels : map [string ]string {"label1" : "value1" , "label2" : "value2" },
@@ -633,14 +633,14 @@ func TestContainerBackCompat(t *testing.T) {
633633}
634634
635635type ports struct {
636- ports []container.Port
636+ ports []container.PortSummary
637637 expected string
638638}
639639
640640func TestDisplayablePorts (t * testing.T ) {
641641 cases := []ports {
642642 {
643- ports : []container.Port {
643+ ports : []container.PortSummary {
644644 {
645645 PrivatePort : 9988 ,
646646 Type : "tcp" ,
@@ -649,7 +649,7 @@ func TestDisplayablePorts(t *testing.T) {
649649 expected : "9988/tcp" ,
650650 },
651651 {
652- ports : []container.Port {
652+ ports : []container.PortSummary {
653653 {
654654 PrivatePort : 9988 ,
655655 Type : "udp" ,
@@ -658,7 +658,7 @@ func TestDisplayablePorts(t *testing.T) {
658658 expected : "9988/udp" ,
659659 },
660660 {
661- ports : []container.Port {
661+ ports : []container.PortSummary {
662662 {
663663 IP : "0.0.0.0" ,
664664 PrivatePort : 9988 ,
@@ -668,7 +668,7 @@ func TestDisplayablePorts(t *testing.T) {
668668 expected : "0.0.0.0:0->9988/tcp" ,
669669 },
670670 {
671- ports : []container.Port {
671+ ports : []container.PortSummary {
672672 {
673673 IP : "::" ,
674674 PrivatePort : 9988 ,
@@ -678,7 +678,7 @@ func TestDisplayablePorts(t *testing.T) {
678678 expected : "[::]:0->9988/tcp" ,
679679 },
680680 {
681- ports : []container.Port {
681+ ports : []container.PortSummary {
682682 {
683683 PrivatePort : 9988 ,
684684 PublicPort : 8899 ,
@@ -688,7 +688,7 @@ func TestDisplayablePorts(t *testing.T) {
688688 expected : "9988/tcp" ,
689689 },
690690 {
691- ports : []container.Port {
691+ ports : []container.PortSummary {
692692 {
693693 IP : "4.3.2.1" ,
694694 PrivatePort : 9988 ,
@@ -699,7 +699,7 @@ func TestDisplayablePorts(t *testing.T) {
699699 expected : "4.3.2.1:8899->9988/tcp" ,
700700 },
701701 {
702- ports : []container.Port {
702+ ports : []container.PortSummary {
703703 {
704704 IP : "::1" ,
705705 PrivatePort : 9988 ,
@@ -710,7 +710,7 @@ func TestDisplayablePorts(t *testing.T) {
710710 expected : "[::1]:8899->9988/tcp" ,
711711 },
712712 {
713- ports : []container.Port {
713+ ports : []container.PortSummary {
714714 {
715715 IP : "4.3.2.1" ,
716716 PrivatePort : 9988 ,
@@ -721,7 +721,7 @@ func TestDisplayablePorts(t *testing.T) {
721721 expected : "4.3.2.1:9988->9988/tcp" ,
722722 },
723723 {
724- ports : []container.Port {
724+ ports : []container.PortSummary {
725725 {
726726 IP : "::1" ,
727727 PrivatePort : 9988 ,
@@ -732,7 +732,7 @@ func TestDisplayablePorts(t *testing.T) {
732732 expected : "[::1]:9988->9988/tcp" ,
733733 },
734734 {
735- ports : []container.Port {
735+ ports : []container.PortSummary {
736736 {
737737 PrivatePort : 9988 ,
738738 Type : "udp" ,
@@ -744,7 +744,7 @@ func TestDisplayablePorts(t *testing.T) {
744744 expected : "9988/udp, 9988/udp" ,
745745 },
746746 {
747- ports : []container.Port {
747+ ports : []container.PortSummary {
748748 {
749749 IP : "1.2.3.4" ,
750750 PublicPort : 9998 ,
@@ -760,7 +760,7 @@ func TestDisplayablePorts(t *testing.T) {
760760 expected : "1.2.3.4:9998-9999->9998-9999/udp" ,
761761 },
762762 {
763- ports : []container.Port {
763+ ports : []container.PortSummary {
764764 {
765765 IP : "::1" ,
766766 PublicPort : 9998 ,
@@ -776,7 +776,7 @@ func TestDisplayablePorts(t *testing.T) {
776776 expected : "[::1]:9998-9999->9998-9999/udp" ,
777777 },
778778 {
779- ports : []container.Port {
779+ ports : []container.PortSummary {
780780 {
781781 IP : "1.2.3.4" ,
782782 PublicPort : 8887 ,
@@ -792,7 +792,7 @@ func TestDisplayablePorts(t *testing.T) {
792792 expected : "1.2.3.4:8887->9998/udp, 1.2.3.4:8888->9999/udp" ,
793793 },
794794 {
795- ports : []container.Port {
795+ ports : []container.PortSummary {
796796 {
797797 IP : "::1" ,
798798 PublicPort : 8887 ,
@@ -808,7 +808,7 @@ func TestDisplayablePorts(t *testing.T) {
808808 expected : "[::1]:8887->9998/udp, [::1]:8888->9999/udp" ,
809809 },
810810 {
811- ports : []container.Port {
811+ ports : []container.PortSummary {
812812 {
813813 PrivatePort : 9998 ,
814814 Type : "udp" ,
@@ -820,7 +820,7 @@ func TestDisplayablePorts(t *testing.T) {
820820 expected : "9998-9999/udp" ,
821821 },
822822 {
823- ports : []container.Port {
823+ ports : []container.PortSummary {
824824 {
825825 IP : "1.2.3.4" ,
826826 PrivatePort : 6677 ,
@@ -835,7 +835,7 @@ func TestDisplayablePorts(t *testing.T) {
835835 expected : "9988/udp, 1.2.3.4:7766->6677/tcp" ,
836836 },
837837 {
838- ports : []container.Port {
838+ ports : []container.PortSummary {
839839 {
840840 IP : "1.2.3.4" ,
841841 PrivatePort : 9988 ,
@@ -861,7 +861,7 @@ func TestDisplayablePorts(t *testing.T) {
861861 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" ,
862862 },
863863 {
864- ports : []container.Port {
864+ ports : []container.PortSummary {
865865 {
866866 PrivatePort : 9988 ,
867867 PublicPort : 8899 ,
@@ -881,7 +881,7 @@ func TestDisplayablePorts(t *testing.T) {
881881 expected : "9988/udp, 4.3.2.1:3322->2233/tcp, 1.2.3.4:7766->6677/tcp" ,
882882 },
883883 {
884- ports : []container.Port {
884+ ports : []container.PortSummary {
885885 {
886886 PrivatePort : 80 ,
887887 Type : "tcp" ,
0 commit comments