Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Smartswitch] Yang model change for bridge midplane #281

Merged
merged 1 commit into from
Sep 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions sonic_data_client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ func TestGetDpuAddress(t *testing.T) {
t.Errorf("get DPU address should failed: %v, but get %s", err, address)
}

midPlaneTable.Hset("GLOBAL", "bridge", "bridge_midplane")
midPlaneTable.Hset("GLOBAL", "bridge", "bridge-midplane")
dpusTable.Hset("dpu0", "midplane_interface", "dpu0")

// test get DPU address when DHCP_SERVER_IPV4_PORT table not ready
Expand All @@ -725,15 +725,15 @@ func TestGetDpuAddress(t *testing.T) {
t.Errorf("get DPU address should failed: %v, but get %s", err, address)
}

dhcpPortTable.Hset("bridge_midplane|dpu0", "invalidfield", "")
dhcpPortTable.Hset("bridge-midplane|dpu0", "invalidfield", "")

// test get DPU address when DHCP_SERVER_IPV4_PORT table broken
address, err = getDpuAddress("dpu0")
if err == nil {
t.Errorf("get DPU address should failed: %v, but get %s", err, address)
}

dhcpPortTable.Hset("bridge_midplane|dpu0", "ips", "127.0.0.2,127.0.0.1")
dhcpPortTable.Hset("bridge-midplane|dpu0", "ips", "127.0.0.2,127.0.0.1")

// test get valid DPU address
address, err = getDpuAddress("dpu0")
Expand Down Expand Up @@ -789,9 +789,9 @@ func TestGetZmqClient(t *testing.T) {
var dpusTable = swsscommon.NewTable(configDb, "DPUS")
var dhcpPortTable = swsscommon.NewTable(configDb, "DHCP_SERVER_IPV4_PORT")

midPlaneTable.Hset("GLOBAL", "bridge", "bridge_midplane")
midPlaneTable.Hset("GLOBAL", "bridge", "bridge-midplane")
dpusTable.Hset("dpu0", "midplane_interface", "dpu0")
dhcpPortTable.Hset("bridge_midplane|dpu0", "ips", "127.0.0.2,127.0.0.1")
dhcpPortTable.Hset("bridge-midplane|dpu0", "ips", "127.0.0.2,127.0.0.1")

client, err := getZmqClient("dpu0", "")
if client != nil || err != nil {
Expand Down
Loading