mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2025-12-10 07:44:39 +01:00
Removed explicit handling of user deletion from test
This commit is contained in:
parent
78157b2241
commit
1a173a3c82
1 changed files with 0 additions and 20 deletions
|
|
@ -1042,16 +1042,6 @@ static void test_api_bbfdm_add_del_standard_object(void **state)
|
|||
fault = dm_entry_param_method(ctx, CMD_DEL_OBJECT, "Device.Users.User.2.", "test_key", NULL);
|
||||
assert_int_equal(fault, 0);
|
||||
|
||||
// delete the section from uci based on 'deleted' option since uci section is deleted from init script
|
||||
struct uci_section *s = NULL, *stmp = NULL;
|
||||
uci_foreach_sections_safe("users", "user", stmp, s) {
|
||||
char *deleted = NULL;
|
||||
dmuci_get_value_by_section_string(s, "deleted", &deleted);
|
||||
if (deleted != NULL && strcmp(deleted, "1") == 0)
|
||||
dmuci_delete_by_section(s, NULL, NULL);
|
||||
}
|
||||
dmuci_commit_package("users");
|
||||
|
||||
// Get name object after deleting instance 2 ==> expected "9005" error
|
||||
fault = dm_entry_param_method(ctx, CMD_GET_NAME, "Device.Users.User.2.", "1", NULL);
|
||||
assert_int_equal(fault, FAULT_9005);
|
||||
|
|
@ -1060,16 +1050,6 @@ static void test_api_bbfdm_add_del_standard_object(void **state)
|
|||
fault = dm_entry_param_method(ctx, CMD_DEL_OBJECT, "Device.Users.User.", "test_key", NULL);
|
||||
assert_int_equal(fault, 0);
|
||||
|
||||
// delete the section from uci based on 'deleted' option since uci section is deleted from init script
|
||||
s = NULL, stmp = NULL;
|
||||
uci_foreach_sections_safe("users", "user", stmp, s) {
|
||||
char *deleted = NULL;
|
||||
dmuci_get_value_by_section_string(s, "deleted", &deleted);
|
||||
if (deleted != NULL && strcmp(deleted, "1") == 0)
|
||||
dmuci_delete_by_section(s, NULL, NULL);
|
||||
}
|
||||
dmuci_commit_package("users");
|
||||
|
||||
// Get name object after deleting all instances ==> expected "9005" error
|
||||
fault = dm_entry_param_method(ctx, CMD_GET_NAME, "Device.Users.User.1.", "1", NULL);
|
||||
assert_int_equal(fault, FAULT_9005);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue