diff --git a/test/files/etc/icwmpd/custom_notification_forced.json b/test/files/etc/icwmpd/custom_notification_forced.json index 1ca1bb9..5f32f8f 100644 --- a/test/files/etc/icwmpd/custom_notification_forced.json +++ b/test/files/etc/icwmpd/custom_notification_forced.json @@ -1,7 +1,7 @@ { "custom_notification": [ { - "parameter": "Device.SSH.", + "parameter": "Device.X_IOPSYS_EU_Dropbear.", "notify_type": "2" }, { diff --git a/test/files/etc/icwmpd/custom_notification_invalid_json.json b/test/files/etc/icwmpd/custom_notification_invalid_json.json index 6bb7a4d..5e7ae4e 100644 --- a/test/files/etc/icwmpd/custom_notification_invalid_json.json +++ b/test/files/etc/icwmpd/custom_notification_invalid_json.json @@ -1,7 +1,7 @@ { "custom_notification": { - "parameter": "Device.SSH.", + "parameter": "Device.X_IOPSYS_EU_Dropbear.", "notify_type": "2" }, { diff --git a/test/files/etc/icwmpd/custom_notification_invalid_parameter.json b/test/files/etc/icwmpd/custom_notification_invalid_parameter.json index f0fb18c..5872ed5 100644 --- a/test/files/etc/icwmpd/custom_notification_invalid_parameter.json +++ b/test/files/etc/icwmpd/custom_notification_invalid_parameter.json @@ -1,7 +1,7 @@ { "custom_notification": [ { - "parameter": "Device.SSH.", + "parameter": "Device.X_IOPSYS_EU_Dropbear.", "notify_type": "2" }, { diff --git a/test/files/etc/icwmpd/custom_notification_valid.json b/test/files/etc/icwmpd/custom_notification_valid.json index c1c8498..7f08ec9 100644 --- a/test/files/etc/icwmpd/custom_notification_valid.json +++ b/test/files/etc/icwmpd/custom_notification_valid.json @@ -1,7 +1,7 @@ { "custom_notification": [ { - "parameter": "Device.SSH.", + "parameter": "Device.X_IOPSYS_EU_Dropbear.", "notify_type": "2" }, { diff --git a/test/script/00_verify_add_method.sh b/test/script/00_verify_add_method.sh index 37b77cb..bbf6fc3 100755 --- a/test/script/00_verify_add_method.sh +++ b/test/script/00_verify_add_method.sh @@ -8,7 +8,7 @@ TEST_NAME="ADD RPC Method" echo "Running: $TEST_NAME" remove_icwmp_log -curl $connection_request_path -X POST --data '{"name": "addObject","objectName":"Device.SSH.Server"}' >/dev/null 2>&1 +curl $connection_request_path -X POST --data '{"name": "addObject","objectName":"Device.X_IOPSYS_EU_Dropbear"}' >/dev/null 2>&1 check_ret $? wait_for_session_end @@ -22,7 +22,7 @@ if [ "$obj_instance" != "2" -o $status != "0" ]; then fi remove_icwmp_log -curl $connection_request_path -X POST --data '{"name": "getParameterValues", "parameterNames": ["Device.SSH.Server.2"] }' >/dev/null 2>&1 +curl $connection_request_path -X POST --data '{"name": "getParameterValues", "parameterNames": ["Device.X_IOPSYS_EU_Dropbear.2"] }' >/dev/null 2>&1 check_ret $? wait_for_session_end diff --git a/test/script/01_verify_delete_method.sh b/test/script/01_verify_delete_method.sh index b9857aa..a06e2be 100755 --- a/test/script/01_verify_delete_method.sh +++ b/test/script/01_verify_delete_method.sh @@ -8,7 +8,7 @@ TEST_NAME="DELETE RPC Method" echo "Running: $TEST_NAME" remove_icwmp_log -curl $connection_request_path -X POST --data '{"name": "deleteObject","objectName":"Device.SSH.Server.2"}' >/dev/null 2>&1 +curl $connection_request_path -X POST --data '{"name": "deleteObject","objectName":"Device.X_IOPSYS_EU_Dropbear.2"}' >/dev/null 2>&1 check_ret $? wait_for_session_end check_session "DeleteObject" @@ -19,12 +19,12 @@ if [ "$status" != "1" ]; then fi remove_icwmp_log -curl $connection_request_path -X POST --data '{"name": "getParameterValues", "parameterNames": ["Device.SSH.Server"] }' >/dev/null 2>&1 +curl $connection_request_path -X POST --data '{"name": "getParameterValues", "parameterNames": ["Device.X_IOPSYS_EU_Dropbear"] }' >/dev/null 2>&1 check_ret $? wait_for_session_end check_session "GetParameterValues" -if grep -q "Device.SSH.Server.2" "$icwmp_log_file"; then - echo "Error: 'Device.SSH.Server.2' object is not really deleted" >> ./funl-test-debug.log +if grep -q "Device.X_IOPSYS_EU_Dropbear.2" "$icwmp_log_file"; then + echo "Error: 'Device.X_IOPSYS_EU_Dropbear.2' object is not really deleted" >> ./funl-test-debug.log exit 1 fi diff --git a/test/script/02_verify_get_method.sh b/test/script/02_verify_get_method.sh index 0b81043..cfe7a96 100755 --- a/test/script/02_verify_get_method.sh +++ b/test/script/02_verify_get_method.sh @@ -8,13 +8,13 @@ TEST_NAME="GET RPC Method" echo "Running: $TEST_NAME" remove_icwmp_log -curl $connection_request_path -X POST --data '{"name": "getParameterValues", "parameterNames": ["Device.SSH.Server.1.Alias"] }' >/dev/null 2>&1 +curl $connection_request_path -X POST --data '{"name": "getParameterValues", "parameterNames": ["Device.X_IOPSYS_EU_Dropbear.1.Alias"] }' >/dev/null 2>&1 check_ret $? wait_for_session_end check_session "GetParameterValues" param_value=$(print_tag_value "cwmp:GetParameterValuesResponse" "Value xsi:type=\"xsd:string\"") if [ "$param_value" != "cpe-1" ]; then - echo "Error: Default value of 'Device.SSH.Server.1.Alias' is wrong, current_value($param_value) expected_value(cpe-1)" >> ./funl-test-debug.log + echo "Error: Default value of 'Device.X_IOPSYS_EU_Dropbear.1.Alias' is wrong, current_value($param_value) expected_value(cpe-1)" >> ./funl-test-debug.log exit 1 fi diff --git a/test/script/03_verify_set_method.sh b/test/script/03_verify_set_method.sh index 9e3a0eb..d2e6b15 100755 --- a/test/script/03_verify_set_method.sh +++ b/test/script/03_verify_set_method.sh @@ -8,18 +8,18 @@ TEST_NAME="SET RPC Method" echo "Running: $TEST_NAME" remove_icwmp_log -curl $connection_request_path -X POST --data '{"name": "getParameterValues", "parameterNames": ["Device.SSH.Server.1.Enable"] }' >/dev/null 2>&1 +curl $connection_request_path -X POST --data '{"name": "getParameterValues", "parameterNames": ["Device.X_IOPSYS_EU_Dropbear.1.PasswordAuth"] }' >/dev/null 2>&1 check_ret $? wait_for_session_end check_session "GetParameterValues" param_value_before=$(print_tag_value "cwmp:GetParameterValuesResponse" "Value xsi:type=\"xsd:boolean\"") if [ "$param_value_before" != "1" ]; then - echo "Error: Default value of 'Device.SSH.Server.1.Enable' is wrong, current_value($param_value_before) expected_value(1)" >> ./funl-test-debug.log + echo "Error: Default value of 'Device.X_IOPSYS_EU_Dropbear.1.PasswordAuth' is wrong, current_value($param_value_before) expected_value(1)" >> ./funl-test-debug.log exit 1 fi remove_icwmp_log -curl $connection_request_path -X POST --data '{"name": "setParameterValues", "parameterValues": [["Device.SSH.Server.1.Enable",false]]}' >/dev/null 2>&1 +curl $connection_request_path -X POST --data '{"name": "setParameterValues", "parameterValues": [["Device.X_IOPSYS_EU_Dropbear.1.PasswordAuth",false]]}' >/dev/null 2>&1 check_ret $? wait_for_session_end check_session "SetParameterValues" @@ -30,17 +30,17 @@ if [ "$get_status" != "1" ]; then fi remove_icwmp_log -curl $connection_request_path -X POST --data '{"name": "getParameterValues", "parameterNames": ["Device.SSH.Server.1.Enable"] }' >/dev/null 2>&1 +curl $connection_request_path -X POST --data '{"name": "getParameterValues", "parameterNames": ["Device.X_IOPSYS_EU_Dropbear.1.PasswordAuth"] }' >/dev/null 2>&1 check_ret $? wait_for_session_end check_session "GetParameterValues" param_value_after=$(print_tag_value "cwmp:GetParameterValuesResponse" "Value xsi:type=\"xsd:boolean\"") if [ "$param_value_after" != "0" ]; then - echo "Error: the value of 'Device.SSH.Server.1.Enable' is wrong, current_value($param_value_after) expected_value(0)" >> ./funl-test-debug.log + echo "Error: the value of 'Device.X_IOPSYS_EU_Dropbear.1.PasswordAuth' is wrong, current_value($param_value_after) expected_value(0)" >> ./funl-test-debug.log exit 1 fi -curl $connection_request_path -X POST --data '{"name": "setParameterValues", "parameterValues": [["Device.SSH.Server.1.Enable",true]]}' >/dev/null 2>&1 +curl $connection_request_path -X POST --data '{"name": "setParameterValues", "parameterValues": [["Device.X_IOPSYS_EU_Dropbear.1.PasswordAuth",true]]}' >/dev/null 2>&1 wait_for_session_end echo "PASS: $TEST_NAME" diff --git a/test/script/verify_custom_notifications.sh b/test/script/verify_custom_notifications.sh index 3b408ed..f5aad63 100755 --- a/test/script/verify_custom_notifications.sh +++ b/test/script/verify_custom_notifications.sh @@ -27,9 +27,9 @@ supervisorctl stop icwmpd check_valgrind_xml -notif1=`uci -c /etc/icwmpd get cwmp_notifications.@notifications[0].active | grep "Device.SSH."` -if [[ $notif1 != *"Device.SSH."* ]]; then - echo "FAIL: active notifications list doesn't contain Device.SSH. parameter" +notif1=`uci -c /etc/icwmpd get cwmp_notifications.@notifications[0].active | grep "Device.X_IOPSYS_EU_Dropbear."` +if [[ $notif1 != *"Device.X_IOPSYS_EU_Dropbear."* ]]; then + echo "FAIL: active notifications list doesn't contain Device.X_IOPSYS_EU_Dropbear. parameter" exit 1 fi notif2=`uci -c /etc/icwmpd get cwmp_notifications.@notifications[0].passive | grep "Device.WiFi.SSID.1.SSID"` @@ -60,9 +60,9 @@ supervisorctl stop icwmpd check_valgrind_xml -notif1=`uci -c /etc/icwmpd get cwmp_notifications.@notifications[0].active | grep "Device.SSH."` -if [[ $notif1 == *"Device.SSH."* ]]; then - echo "FAIL: the json file is invalid, the active notifcation list shouldn't contain Device.SSH. parameter" +notif1=`uci -c /etc/icwmpd get cwmp_notifications.@notifications[0].active | grep "Device.X_IOPSYS_EU_Dropbear."` +if [[ $notif1 == *"Device.X_IOPSYS_EU_Dropbear."* ]]; then + echo "FAIL: the json file is invalid, the active notifcation list shouldn't contain Device.X_IOPSYS_EU_Dropbear. parameter" exit 1 fi notif2=`uci -c /etc/icwmpd get cwmp_notifications.@notifications[0].passive | grep "Device.WiFi.SSID.1.SSID"` @@ -98,9 +98,9 @@ supervisorctl stop icwmpd check_valgrind_xml -notif1=`uci -c /etc/icwmpd get cwmp_notifications.@notifications[0].active | grep "Device.SSH."` -if [[ $notif1 != *"Device.SSH."* ]]; then - echo "FAIL: active notifications list doesn't contain Device.SSH. parameter" +notif1=`uci -c /etc/icwmpd get cwmp_notifications.@notifications[0].active | grep "Device.X_IOPSYS_EU_Dropbear."` +if [[ $notif1 != *"Device.X_IOPSYS_EU_Dropbear."* ]]; then + echo "FAIL: active notifications list doesn't contain Device.X_IOPSYS_EU_Dropbear. parameter" exit 1 fi notif2=`uci -c /etc/icwmpd get cwmp_notifications.@notifications[0].passive | grep "Device.DeviceInfo.ProvisioningCode"` @@ -136,9 +136,9 @@ supervisorctl stop icwmpd check_valgrind_xml -notif1=`uci -c /etc/icwmpd get cwmp_notifications.@notifications[0].active | grep "Device.SSH."` -if [[ $notif1 != *"Device.SSH."* ]]; then - echo "FAIL: active notifications list doesn't contain Device.SSH. parameter" +notif1=`uci -c /etc/icwmpd get cwmp_notifications.@notifications[0].active | grep "Device.X_IOPSYS_EU_Dropbear."` +if [[ $notif1 != *"Device.X_IOPSYS_EU_Dropbear."* ]]; then + echo "FAIL: active notifications list doesn't contain Device.X_IOPSYS_EU_Dropbear. parameter" exit 1 fi notif2=`uci -c /etc/icwmpd get cwmp_notifications.@notifications[0].passive | grep "Device.WiFi.SSID.1.SD"`