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

[vstest]: fix test_speed.py test #780

Merged
merged 1 commit into from
Feb 1, 2019
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
12 changes: 8 additions & 4 deletions tests/test_speed.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
class TestSpeedSet(object):
num_ports = 32
def test_SpeedAndBufferSet(self, dvs, testlog):
speed_list = ['50000', '25000', '40000', '10000', '100000']
configured_speed_list = ['40000']
speed_list = ['10000', '25000', '40000', '50000', '100000']

cdb = swsscommon.DBConnector(4, dvs.redis_sock, 0)
adb = swsscommon.DBConnector(1, dvs.redis_sock, 0)
Expand All @@ -28,11 +29,11 @@ def test_SpeedAndBufferSet(self, dvs, testlog):

buffer_profiles = cfg_buffer_profile_table.getKeys()
expected_buffer_profiles_num = len(buffer_profiles)
# buffers.json used for the test defines 4 static profiles:
# "ingress_lossless_profile"
# buffers_config.j2 used for the test defines 3 static profiles and 1 dynamic profiles:
# "ingress_lossy_profile"
# "egress_lossless_profile"
# "egress_lossy_profile"
# "pg_lossless_40000_300m_profile"
# check if they get the DB
assert expected_buffer_profiles_num == 4
# and if they were successfully created on ASIC
Expand Down Expand Up @@ -61,7 +62,10 @@ def test_SpeedAndBufferSet(self, dvs, testlog):
assert num_set == self.num_ports

# check number of created profiles
expected_buffer_profiles_num += 1 # new speed should add new PG profile
if speed not in configured_speed_list:
expected_buffer_profiles_num += 1 # new speed should add new PG profile
configured_speed_list.append(speed)

current_buffer_profiles = cfg_buffer_profile_table.getKeys()
assert len(current_buffer_profiles) == expected_buffer_profiles_num
# make sure the same number of profiles are created on ASIC
Expand Down