@@ -656,6 +656,7 @@ func TestClientVSwitchSetInterfaceOK(t *testing.T) {
656656 peer := "eth0"
657657 ratePolicing := DefaultIngressRatePolicing
658658 burstPolicing := DefaultIngressBurstPolicing
659+ requestedMTU := 9000
659660
660661 // Apply Timeout option to verify arguments
661662 c := testClient ([]OptionFunc {Timeout (1 )}, func (cmd string , args ... string ) ([]byte , error ) {
@@ -672,6 +673,7 @@ func TestClientVSwitchSetInterfaceOK(t *testing.T) {
672673 string (ifi ),
673674 fmt .Sprintf ("type=%s" , ifiType ),
674675 fmt .Sprintf ("options:peer=%s" , peer ),
676+ "mtu_request=9000" ,
675677 "ingress_policing_rate=0" ,
676678 "ingress_policing_burst=0" ,
677679 }
@@ -688,6 +690,7 @@ func TestClientVSwitchSetInterfaceOK(t *testing.T) {
688690 Peer : peer ,
689691 IngressRatePolicing : ratePolicing ,
690692 IngressBurstPolicing : burstPolicing ,
693+ MTURequest : requestedMTU ,
691694 })
692695 if err != nil {
693696 t .Fatalf ("unexpected error for Client.VSwitch.Set.Interface: %v" , err )
@@ -787,6 +790,15 @@ func TestInterfaceOptions_slice(t *testing.T) {
787790 "options:peer=bond0" ,
788791 },
789792 },
793+ {
794+ desc : "only MTURequest" ,
795+ i : InterfaceOptions {
796+ MTURequest : 9000 ,
797+ },
798+ out : []string {
799+ "mtu_request=9000" ,
800+ },
801+ },
790802 {
791803 desc : "only ingress policing rate" ,
792804 i : InterfaceOptions {
@@ -852,10 +864,12 @@ func TestInterfaceOptions_slice(t *testing.T) {
852864 Peer : "bond0" ,
853865 IngressRatePolicing : 2000000 ,
854866 IngressBurstPolicing : 200000 ,
867+ MTURequest : 9000 ,
855868 },
856869 out : []string {
857870 "type=patch" ,
858871 "options:peer=bond0" ,
872+ "mtu_request=9000" ,
859873 "ingress_policing_rate=2000000" ,
860874 "ingress_policing_burst=200000" ,
861875 },
0 commit comments