@@ -656,6 +656,7 @@ func TestClientVSwitchSetInterfaceOK(t *testing.T) {
656
656
peer := "eth0"
657
657
ratePolicing := DefaultIngressRatePolicing
658
658
burstPolicing := DefaultIngressBurstPolicing
659
+ requestedMTU := 9000
659
660
660
661
// Apply Timeout option to verify arguments
661
662
c := testClient ([]OptionFunc {Timeout (1 )}, func (cmd string , args ... string ) ([]byte , error ) {
@@ -672,6 +673,7 @@ func TestClientVSwitchSetInterfaceOK(t *testing.T) {
672
673
string (ifi ),
673
674
fmt .Sprintf ("type=%s" , ifiType ),
674
675
fmt .Sprintf ("options:peer=%s" , peer ),
676
+ "mtu_request=9000" ,
675
677
"ingress_policing_rate=0" ,
676
678
"ingress_policing_burst=0" ,
677
679
}
@@ -688,6 +690,7 @@ func TestClientVSwitchSetInterfaceOK(t *testing.T) {
688
690
Peer : peer ,
689
691
IngressRatePolicing : ratePolicing ,
690
692
IngressBurstPolicing : burstPolicing ,
693
+ MTURequest : requestedMTU ,
691
694
})
692
695
if err != nil {
693
696
t .Fatalf ("unexpected error for Client.VSwitch.Set.Interface: %v" , err )
@@ -787,6 +790,15 @@ func TestInterfaceOptions_slice(t *testing.T) {
787
790
"options:peer=bond0" ,
788
791
},
789
792
},
793
+ {
794
+ desc : "only MTURequest" ,
795
+ i : InterfaceOptions {
796
+ MTURequest : 9000 ,
797
+ },
798
+ out : []string {
799
+ "mtu_request=9000" ,
800
+ },
801
+ },
790
802
{
791
803
desc : "only ingress policing rate" ,
792
804
i : InterfaceOptions {
@@ -852,10 +864,12 @@ func TestInterfaceOptions_slice(t *testing.T) {
852
864
Peer : "bond0" ,
853
865
IngressRatePolicing : 2000000 ,
854
866
IngressBurstPolicing : 200000 ,
867
+ MTURequest : 9000 ,
855
868
},
856
869
out : []string {
857
870
"type=patch" ,
858
871
"options:peer=bond0" ,
872
+ "mtu_request=9000" ,
859
873
"ingress_policing_rate=2000000" ,
860
874
"ingress_policing_burst=200000" ,
861
875
},
0 commit comments