@@ -577,6 +577,105 @@ func TestPortsUpdateState(t *testing.T) {
577
577
},
578
578
},
579
579
},
580
+ {
581
+ Desc : "change configed ports order with ranged covered not ranged" ,
582
+ Changes : []Change {
583
+ {
584
+ Config : & ConfigChange {
585
+ workspace : []* gitpod.PortConfig {
586
+ {Port : 3000 , Visibility : "private" , Name : "react" },
587
+ },
588
+ instance : []* gitpod.PortsItems {
589
+ {Port : 3001 , Visibility : "private" , Name : "react" },
590
+ {Port : 3000 , Visibility : "private" , Name : "react" },
591
+ },
592
+ },
593
+ },
594
+ {
595
+ Config : & ConfigChange {
596
+ workspace : []* gitpod.PortConfig {
597
+ {Port : 3000 , Visibility : "private" , Name : "react" },
598
+ },
599
+ instance : []* gitpod.PortsItems {
600
+ {Port : 3003 , Visibility : "private" , Name : "react" },
601
+ {Port : 3001 , Visibility : "private" , Name : "react" },
602
+ {Port : "3001-3005" , Visibility : "private" , Name : "react" },
603
+ {Port : 3000 , Visibility : "private" , Name : "react" },
604
+ },
605
+ },
606
+ },
607
+ {
608
+ Served : []ServedPort {{net .IPv4zero , 3000 , false }},
609
+ },
610
+ {
611
+ Served : []ServedPort {{net .IPv4zero , 3000 , false }, {net .IPv4zero , 3001 , false }, {net .IPv4zero , 3002 , false }},
612
+ },
613
+ {
614
+ Config : & ConfigChange {
615
+ workspace : []* gitpod.PortConfig {
616
+ {Port : 3000 , Visibility : "private" , Name : "react" },
617
+ },
618
+ instance : []* gitpod.PortsItems {
619
+ {Port : 3003 , Visibility : "private" , Name : "react" },
620
+ {Port : 3000 , Visibility : "private" , Name : "react" },
621
+ },
622
+ },
623
+ },
624
+ {
625
+ Config : & ConfigChange {
626
+ workspace : []* gitpod.PortConfig {
627
+ {Port : 3000 , Visibility : "private" , Name : "react" },
628
+ },
629
+ instance : []* gitpod.PortsItems {
630
+ {Port : "3001-3005" , Visibility : "private" , Name : "react" },
631
+ {Port : 3003 , Visibility : "private" , Name : "react" },
632
+ {Port : 3000 , Visibility : "private" , Name : "react" },
633
+ },
634
+ },
635
+ },
636
+ },
637
+ ExpectedExposure : []ExposedPort {
638
+ {LocalPort : 3000 },
639
+ {LocalPort : 3001 },
640
+ {LocalPort : 3002 },
641
+ {LocalPort : 3003 },
642
+ },
643
+ ExpectedUpdates : UpdateExpectation {
644
+ {},
645
+ {
646
+ {LocalPort : 3001 , Name : "react" , OnOpen : api .PortsStatus_notify },
647
+ {LocalPort : 3000 , Name : "react" , OnOpen : api .PortsStatus_notify },
648
+ },
649
+ {
650
+ {LocalPort : 3003 , Name : "react" , OnOpen : api .PortsStatus_notify },
651
+ {LocalPort : 3001 , Name : "react" , OnOpen : api .PortsStatus_notify },
652
+ {LocalPort : 3000 , Name : "react" , OnOpen : api .PortsStatus_notify },
653
+ },
654
+ {
655
+ {LocalPort : 3003 , Name : "react" , OnOpen : api .PortsStatus_notify },
656
+ {LocalPort : 3001 , Name : "react" , OnOpen : api .PortsStatus_notify },
657
+ {LocalPort : 3000 , Served : true , Name : "react" , OnOpen : api .PortsStatus_notify },
658
+ },
659
+ {
660
+ {LocalPort : 3003 , Name : "react" , OnOpen : api .PortsStatus_notify },
661
+ {LocalPort : 3001 , Served : true , Name : "react" , OnOpen : api .PortsStatus_notify },
662
+ {LocalPort : 3002 , Served : true , Name : "react" , OnOpen : api .PortsStatus_notify },
663
+ {LocalPort : 3000 , Served : true , Name : "react" , OnOpen : api .PortsStatus_notify },
664
+ },
665
+ {
666
+ {LocalPort : 3003 , Name : "react" , OnOpen : api .PortsStatus_notify },
667
+ {LocalPort : 3000 , Served : true , Name : "react" , OnOpen : api .PortsStatus_notify },
668
+ {LocalPort : 3001 , Served : true , OnOpen : api .PortsStatus_notify_private },
669
+ {LocalPort : 3002 , Served : true , OnOpen : api .PortsStatus_notify_private },
670
+ },
671
+ {
672
+ {LocalPort : 3001 , Name : "react" , Served : true , OnOpen : api .PortsStatus_notify },
673
+ {LocalPort : 3002 , Name : "react" , Served : true , OnOpen : api .PortsStatus_notify },
674
+ {LocalPort : 3003 , Name : "react" , OnOpen : api .PortsStatus_notify },
675
+ {LocalPort : 3000 , Served : true , Name : "react" , OnOpen : api .PortsStatus_notify },
676
+ },
677
+ },
678
+ },
580
679
}
581
680
582
681
log .Log .Logger .SetLevel (logrus .FatalLevel )
0 commit comments