@@ -19,6 +19,7 @@ import (
1919 "errors"
2020 "fmt"
2121 "reflect"
22+ "strconv"
2223 "strings"
2324 "testing"
2425)
@@ -472,6 +473,7 @@ func TestClientVSwitchSetBridgeOptionsOK(t *testing.T) {
472473 ProtocolOpenFlow15 ,
473474 }
474475 hwaddr := "55:84:a3:2f:d3:20"
476+ stp := true
475477
476478 c := testClient ([]OptionFunc {Timeout (1 )}, func (cmd string , args ... string ) ([]byte , error ) {
477479 if want , got := "ovs-vsctl" , cmd ; want != got {
@@ -486,6 +488,7 @@ func TestClientVSwitchSetBridgeOptionsOK(t *testing.T) {
486488 bridge ,
487489 fmt .Sprintf ("protocols=%s" , strings .Join (protocols , "," )),
488490 fmt .Sprintf ("other-config:hwaddr=%s" , hwaddr ),
491+ fmt .Sprintf ("stp_enable=%s" , strconv .FormatBool (stp )),
489492 }
490493 if want , got := wantArgs , args ; ! reflect .DeepEqual (want , got ) {
491494 t .Fatalf ("incorrect arguments\n - want: %v\n - got: %v" ,
@@ -498,6 +501,7 @@ func TestClientVSwitchSetBridgeOptionsOK(t *testing.T) {
498501 err := c .VSwitch .Set .Bridge (bridge , BridgeOptions {
499502 Protocols : protocols ,
500503 HWAddr : hwaddr ,
504+ STP : & stp ,
501505 })
502506 if err != nil {
503507 t .Fatalf ("unexpected error for Client.VSwitch.Set.Bridge: %v" , err )
0 commit comments