Skip to content

Commit

Permalink
Add ut to improve coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
ganglyu committed Jul 28, 2023
1 parent b114fb5 commit 3d97792
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/test_gnmi_appldb.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,24 @@ def test_gnmi_update_normal_02(self, test_data):
ret, msg = gnmi_set([], update_list, [])
assert ret != 0, "Invalid json ietf value"

@pytest.mark.parametrize('test_data', test_data_update_normal)
def test_gnmi_update_normal_03(self, test_data):
clear_appl_db('DASH_QOS')
clear_appl_db('DASH_VNET')
update_list = []
get_list = []
for i, data in enumerate(test_data):
path = data['update_path']
value = "x"
file_name = 'update' + str(i)
file_object = open(file_name, 'w')
file_object.write(value)
file_object.close()
update_list.append(path + ':@./' + file_name)

ret, msg = gnmi_set([], update_list, [])
assert ret != 0, "Invalid json ietf value"

@pytest.mark.parametrize('test_data', test_data_update_normal)
def test_gnmi_delete_normal_01(self, test_data):
delete_list = []
Expand Down

0 comments on commit 3d97792

Please sign in to comment.