@@ -461,7 +461,7 @@ func TestClientVSwitchGetBridgeProtocolsOK(t *testing.T) {
461
461
}
462
462
}
463
463
464
- func TestClientVSwitchSetBridgeProtocolsOK (t * testing.T ) {
464
+ func TestClientVSwitchSetBridgeOptionsOK (t * testing.T ) {
465
465
const bridge = "br0"
466
466
protocols := []string {
467
467
ProtocolOpenFlow10 ,
@@ -471,6 +471,7 @@ func TestClientVSwitchSetBridgeProtocolsOK(t *testing.T) {
471
471
ProtocolOpenFlow14 ,
472
472
ProtocolOpenFlow15 ,
473
473
}
474
+ hwaddr := "55:84:a3:2f:d3:20"
474
475
475
476
c := testClient ([]OptionFunc {Timeout (1 )}, func (cmd string , args ... string ) ([]byte , error ) {
476
477
if want , got := "ovs-vsctl" , cmd ; want != got {
@@ -484,6 +485,7 @@ func TestClientVSwitchSetBridgeProtocolsOK(t *testing.T) {
484
485
"bridge" ,
485
486
bridge ,
486
487
fmt .Sprintf ("protocols=%s" , strings .Join (protocols , "," )),
488
+ fmt .Sprintf ("other-config:hwaddr=%s" , hwaddr ),
487
489
}
488
490
if want , got := wantArgs , args ; ! reflect .DeepEqual (want , got ) {
489
491
t .Fatalf ("incorrect arguments\n - want: %v\n - got: %v" ,
@@ -495,6 +497,7 @@ func TestClientVSwitchSetBridgeProtocolsOK(t *testing.T) {
495
497
496
498
err := c .VSwitch .Set .Bridge (bridge , BridgeOptions {
497
499
Protocols : protocols ,
500
+ HWAddr : hwaddr ,
498
501
})
499
502
if err != nil {
500
503
t .Fatalf ("unexpected error for Client.VSwitch.Set.Bridge: %v" , err )
0 commit comments