@@ -1740,6 +1740,40 @@ TEST(ConnTrackerTest, TestExternalIPsConfigChangeEnableEgress) {
1740
1740
.expected_delta = {
1741
1741
{conn_ingress_normalized, ConnStatus (connection_time, false )},
1742
1742
}},
1743
+ {// Disable EGRESS enable INGRESS
1744
+ .previous_direction = ExternalIPsConfig::Direction::EGRESS,
1745
+ .new_direction = ExternalIPsConfig::Direction::INGRESS,
1746
+ .old_state = {
1747
+ {conn_ingress, ConnStatus (connection_time, true )},
1748
+ {conn_ingress_normalized, ConnStatus (connection_time, true )}, /* closed */
1749
+ {conn_egress, ConnStatus (connection_time, true )} /* closed */ ,
1750
+ {conn_egress_normalized, ConnStatus (connection_time, true )},
1751
+ },
1752
+ .resulting_old_state = {
1753
+ {conn_ingress, ConnStatus (connection_time, true )},
1754
+ {conn_egress_normalized, ConnStatus (connection_time, true )},
1755
+ },
1756
+ .expected_delta = {
1757
+ {conn_ingress_normalized, ConnStatus (connection_time, false )},
1758
+ {conn_egress, ConnStatus (connection_time, false )},
1759
+ }},
1760
+ {// Disable INGRESS enable EGRESS
1761
+ .previous_direction = ExternalIPsConfig::Direction::INGRESS,
1762
+ .new_direction = ExternalIPsConfig::Direction::EGRESS,
1763
+ .old_state = {
1764
+ {conn_ingress, ConnStatus (connection_time, true )} /* closed */ ,
1765
+ {conn_ingress_normalized, ConnStatus (connection_time, true )},
1766
+ {conn_egress, ConnStatus (connection_time, true )},
1767
+ {conn_egress_normalized, ConnStatus (connection_time, true )} /* closed */ ,
1768
+ },
1769
+ .resulting_old_state = {
1770
+ {conn_ingress_normalized, ConnStatus (connection_time, true )},
1771
+ {conn_egress, ConnStatus (connection_time, true )},
1772
+ },
1773
+ .expected_delta = {
1774
+ {conn_ingress, ConnStatus (connection_time, false )},
1775
+ {conn_egress_normalized, ConnStatus (connection_time, false )},
1776
+ }},
1743
1777
{// Disable EGRESS
1744
1778
.previous_direction = ExternalIPsConfig::Direction::BOTH,
1745
1779
.new_direction = ExternalIPsConfig::Direction::INGRESS,
0 commit comments