Skip to content

Commit

Permalink
correction
Browse files Browse the repository at this point in the history
  • Loading branch information
charantejag504 committed Feb 16, 2024
1 parent 842ff0f commit e869000
Showing 1 changed file with 24 additions and 18 deletions.
42 changes: 24 additions & 18 deletions feature/qos/tests/qos_ecn_config_test/qos_ecn_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,17 +279,21 @@ func testECNConfig(t *testing.T, q *oc.Qos) {
}

}
if got, want := gnmi.Get(t, dut, wredUniform.MinThreshold().State()), ecnConfig.minThreshold; got != want {
t.Errorf("wredUniform.MinThreshold().State(): got %v, want %v", got, want)
}
if got, want := gnmi.Get(t, dut, wredUniform.MaxThreshold().State()), ecnConfig.maxThreshold; got != want {
t.Errorf("wredUniform.MaxThreshold().State(): got %v, want %v", got, want)
}
if got, want := gnmi.Get(t, dut, wredUniform.Drop().State()), ecnConfig.dropEnabled; got != want {
t.Errorf("wredUniform.Drop().State(): got %v, want %v", got, want)
if !deviations.StatePathsUnsupported(dut) {
if got, want := gnmi.Get(t, dut, wredUniform.MinThreshold().State()), ecnConfig.minThreshold; got != want {
t.Errorf("wredUniform.MinThreshold().State(): got %v, want %v", got, want)
}
if got, want := gnmi.Get(t, dut, wredUniform.MaxThreshold().State()), ecnConfig.maxThreshold; got != want {
t.Errorf("wredUniform.MaxThreshold().State(): got %v, want %v", got, want)
}
}
if got, want := gnmi.Get(t, dut, wredUniform.Weight().State()), ecnConfig.weight; got != want {
t.Errorf("wredUniform.Weight().State(): got %v, want %v", got, want)
if !deviations.DropWeightLeavesUnsupported(dut) {
if got, want := gnmi.Get(t, dut, wredUniform.Drop().State()), ecnConfig.dropEnabled; got != want {
t.Errorf("wredUniform.Drop().State(): got %v, want %v", got, want)
}
if got, want := gnmi.Get(t, dut, wredUniform.Weight().State()), ecnConfig.weight; got != want {
t.Errorf("wredUniform.Weight().State(): got %v, want %v", got, want)
}
}
}

Expand Down Expand Up @@ -421,14 +425,16 @@ func testQoSOutputIntfConfig(t *testing.T, q *oc.Qos) {
// Verify the policy is applied by checking the telemetry path state values.
policy := gnmi.OC().Qos().Interface(dp.Name()).Output().SchedulerPolicy()
outQueue := gnmi.OC().Qos().Interface(dp.Name()).Output().Queue(tc.queueName)
if got, want := gnmi.Get(t, dut, policy.Name().State()), tc.scheduler; got != want {
t.Errorf("policy.Name().State(): got %v, want %v", got, want)
}
if got, want := gnmi.Get(t, dut, outQueue.Name().State()), tc.queueName; got != want {
t.Errorf("outQueue.Name().State(): got %v, want %v", got, want)
}
if got, want := gnmi.Get(t, dut, outQueue.QueueManagementProfile().State()), tc.ecnProfile; got != want {
t.Errorf("outQueue.QueueManagementProfile().State(): got %v, want %v", got, want)
if !deviations.StatePathsUnsupported(dut) {
if got, want := gnmi.Get(t, dut, policy.Name().State()), tc.scheduler; got != want {
t.Errorf("policy.Name().State(): got %v, want %v", got, want)
}
if got, want := gnmi.Get(t, dut, outQueue.Name().State()), tc.queueName; got != want {
t.Errorf("outQueue.Name().State(): got %v, want %v", got, want)
}
if got, want := gnmi.Get(t, dut, outQueue.QueueManagementProfile().State()), tc.ecnProfile; got != want {
t.Errorf("outQueue.QueueManagementProfile().State(): got %v, want %v", got, want)
}
}
if deviations.QosGetStatePathUnsupported(dut) {
if got, want := gnmi.Get(t, dut, policy.Name().Config()), tc.scheduler; got != want {
Expand Down

0 comments on commit e869000

Please sign in to comment.