@@ -100,7 +100,7 @@ func TestContainerPsContext(t *testing.T) {
100
100
call : ctx .CreatedAt ,
101
101
},
102
102
{
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" }}},
104
104
trunc : true ,
105
105
expValue : "8080/tcp" ,
106
106
call : ctx .Ports ,
@@ -549,7 +549,7 @@ func TestContainerBackCompat(t *testing.T) {
549
549
ImageManifestDescriptor : nil ,
550
550
Command : "/bin/sh" ,
551
551
Created : createdAtTime .UTC ().Unix (),
552
- Ports : []container.Port {{PrivatePort : 8080 , PublicPort : 8080 , Type : "tcp" }},
552
+ Ports : []container.PortSummary {{PrivatePort : 8080 , PublicPort : 8080 , Type : "tcp" }},
553
553
SizeRw : 123 ,
554
554
SizeRootFs : 12345 ,
555
555
Labels : map [string ]string {"label1" : "value1" , "label2" : "value2" },
@@ -596,14 +596,14 @@ func TestContainerBackCompat(t *testing.T) {
596
596
}
597
597
598
598
type ports struct {
599
- ports []container.Port
599
+ ports []container.PortSummary
600
600
expected string
601
601
}
602
602
603
603
func TestDisplayablePorts (t * testing.T ) {
604
604
cases := []ports {
605
605
{
606
- ports : []container.Port {
606
+ ports : []container.PortSummary {
607
607
{
608
608
PrivatePort : 9988 ,
609
609
Type : "tcp" ,
@@ -612,7 +612,7 @@ func TestDisplayablePorts(t *testing.T) {
612
612
expected : "9988/tcp" ,
613
613
},
614
614
{
615
- ports : []container.Port {
615
+ ports : []container.PortSummary {
616
616
{
617
617
PrivatePort : 9988 ,
618
618
Type : "udp" ,
@@ -621,7 +621,7 @@ func TestDisplayablePorts(t *testing.T) {
621
621
expected : "9988/udp" ,
622
622
},
623
623
{
624
- ports : []container.Port {
624
+ ports : []container.PortSummary {
625
625
{
626
626
IP : "0.0.0.0" ,
627
627
PrivatePort : 9988 ,
@@ -631,7 +631,7 @@ func TestDisplayablePorts(t *testing.T) {
631
631
expected : "0.0.0.0:0->9988/tcp" ,
632
632
},
633
633
{
634
- ports : []container.Port {
634
+ ports : []container.PortSummary {
635
635
{
636
636
IP : "::" ,
637
637
PrivatePort : 9988 ,
@@ -641,7 +641,7 @@ func TestDisplayablePorts(t *testing.T) {
641
641
expected : "[::]:0->9988/tcp" ,
642
642
},
643
643
{
644
- ports : []container.Port {
644
+ ports : []container.PortSummary {
645
645
{
646
646
PrivatePort : 9988 ,
647
647
PublicPort : 8899 ,
@@ -651,7 +651,7 @@ func TestDisplayablePorts(t *testing.T) {
651
651
expected : "9988/tcp" ,
652
652
},
653
653
{
654
- ports : []container.Port {
654
+ ports : []container.PortSummary {
655
655
{
656
656
IP : "4.3.2.1" ,
657
657
PrivatePort : 9988 ,
@@ -662,7 +662,7 @@ func TestDisplayablePorts(t *testing.T) {
662
662
expected : "4.3.2.1:8899->9988/tcp" ,
663
663
},
664
664
{
665
- ports : []container.Port {
665
+ ports : []container.PortSummary {
666
666
{
667
667
IP : "::1" ,
668
668
PrivatePort : 9988 ,
@@ -673,7 +673,7 @@ func TestDisplayablePorts(t *testing.T) {
673
673
expected : "[::1]:8899->9988/tcp" ,
674
674
},
675
675
{
676
- ports : []container.Port {
676
+ ports : []container.PortSummary {
677
677
{
678
678
IP : "4.3.2.1" ,
679
679
PrivatePort : 9988 ,
@@ -684,7 +684,7 @@ func TestDisplayablePorts(t *testing.T) {
684
684
expected : "4.3.2.1:9988->9988/tcp" ,
685
685
},
686
686
{
687
- ports : []container.Port {
687
+ ports : []container.PortSummary {
688
688
{
689
689
IP : "::1" ,
690
690
PrivatePort : 9988 ,
@@ -695,7 +695,7 @@ func TestDisplayablePorts(t *testing.T) {
695
695
expected : "[::1]:9988->9988/tcp" ,
696
696
},
697
697
{
698
- ports : []container.Port {
698
+ ports : []container.PortSummary {
699
699
{
700
700
PrivatePort : 9988 ,
701
701
Type : "udp" ,
@@ -707,7 +707,7 @@ func TestDisplayablePorts(t *testing.T) {
707
707
expected : "9988/udp, 9988/udp" ,
708
708
},
709
709
{
710
- ports : []container.Port {
710
+ ports : []container.PortSummary {
711
711
{
712
712
IP : "1.2.3.4" ,
713
713
PublicPort : 9998 ,
@@ -723,7 +723,7 @@ func TestDisplayablePorts(t *testing.T) {
723
723
expected : "1.2.3.4:9998-9999->9998-9999/udp" ,
724
724
},
725
725
{
726
- ports : []container.Port {
726
+ ports : []container.PortSummary {
727
727
{
728
728
IP : "::1" ,
729
729
PublicPort : 9998 ,
@@ -739,7 +739,7 @@ func TestDisplayablePorts(t *testing.T) {
739
739
expected : "[::1]:9998-9999->9998-9999/udp" ,
740
740
},
741
741
{
742
- ports : []container.Port {
742
+ ports : []container.PortSummary {
743
743
{
744
744
IP : "1.2.3.4" ,
745
745
PublicPort : 8887 ,
@@ -755,7 +755,7 @@ func TestDisplayablePorts(t *testing.T) {
755
755
expected : "1.2.3.4:8887->9998/udp, 1.2.3.4:8888->9999/udp" ,
756
756
},
757
757
{
758
- ports : []container.Port {
758
+ ports : []container.PortSummary {
759
759
{
760
760
IP : "::1" ,
761
761
PublicPort : 8887 ,
@@ -771,7 +771,7 @@ func TestDisplayablePorts(t *testing.T) {
771
771
expected : "[::1]:8887->9998/udp, [::1]:8888->9999/udp" ,
772
772
},
773
773
{
774
- ports : []container.Port {
774
+ ports : []container.PortSummary {
775
775
{
776
776
PrivatePort : 9998 ,
777
777
Type : "udp" ,
@@ -783,7 +783,7 @@ func TestDisplayablePorts(t *testing.T) {
783
783
expected : "9998-9999/udp" ,
784
784
},
785
785
{
786
- ports : []container.Port {
786
+ ports : []container.PortSummary {
787
787
{
788
788
IP : "1.2.3.4" ,
789
789
PrivatePort : 6677 ,
@@ -798,7 +798,7 @@ func TestDisplayablePorts(t *testing.T) {
798
798
expected : "9988/udp, 1.2.3.4:7766->6677/tcp" ,
799
799
},
800
800
{
801
- ports : []container.Port {
801
+ ports : []container.PortSummary {
802
802
{
803
803
IP : "1.2.3.4" ,
804
804
PrivatePort : 9988 ,
@@ -824,7 +824,7 @@ func TestDisplayablePorts(t *testing.T) {
824
824
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" ,
825
825
},
826
826
{
827
- ports : []container.Port {
827
+ ports : []container.PortSummary {
828
828
{
829
829
PrivatePort : 9988 ,
830
830
PublicPort : 8899 ,
@@ -844,7 +844,7 @@ func TestDisplayablePorts(t *testing.T) {
844
844
expected : "9988/udp, 4.3.2.1:3322->2233/tcp, 1.2.3.4:7766->6677/tcp" ,
845
845
},
846
846
{
847
- ports : []container.Port {
847
+ ports : []container.PortSummary {
848
848
{
849
849
PrivatePort : 80 ,
850
850
Type : "tcp" ,
0 commit comments