[UTC][connection][Non-ACR][Fix incorrect test scenario] 77/225677/1
authorJaehyun Kim <jeik01.kim@samsung.com>
Mon, 17 Feb 2020 07:59:05 +0000 (16:59 +0900)
committerJihun Park <jihun87.park@samsung.com>
Mon, 24 Feb 2020 02:30:38 +0000 (02:30 +0000)
Change-Id: I641e33ef88116afddf65283342995c1ef36cb66e
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
(cherry picked from commit 751eaaace2e8ecb982dde25e7308739a459217fa)

src/utc/connection/utc-connection-profile.c
src/utc/connection/utc-network-connection.c

index bae2bcfc2cd9c918f774a05ebbda46dc61f1355f..b44be7425ec11cb83ea26fa0b835e92dd654ff97 100755 (executable)
@@ -3029,7 +3029,7 @@ int utc_connection_profile_get_prefix_length_p(void)
 
        int ret = connection_get_current_profile(connection, &profile_temp);
        CHECK_RETURN("connection_profile_get_prefix_length", ret, CONNECTION_ERROR_NONE);
-       connection_profile_get_prefix_length(profile_temp, CONNECTION_ADDRESS_FAMILY_IPV4, &length);
+       ret = connection_profile_get_prefix_length(profile_temp, CONNECTION_ADDRESS_FAMILY_IPV4, &length);
        CHECK_RETURN("connection_profile_get_prefix_length", ret, CONNECTION_ERROR_NONE);
        ret = connection_profile_get_prefix_length(profile_temp, CONNECTION_ADDRESS_FAMILY_IPV6, &length);
        CHECK_RETURN("connection_profile_get_prefix_length", ret, CONNECTION_ERROR_NONE);
index bf9f5d49ca6fa340185a2dc571a353d3a4bc3ad0..192ea681a1ca564a3ada84b2df2611bca875b98b 100755 (executable)
@@ -2215,22 +2215,13 @@ int utc_connection_remove_profile_p(void)
                ret = connection_remove_profile(connection, profile_temp);
                CHECK_RETURN("connection_remove_profile", ret, CONNECTION_ERROR_NONE);
        } else {
-               ret = test_get_any_profile(&profile_h);
-               assert(profile_h);
-               profile_temp = profile_h;
-
-               connection_profile_type_e type;
-
-               ret = connection_profile_get_type(profile_temp, &type);
-               CHECK_RETURN("connection_profile_get_type", ret, CONNECTION_ERROR_NONE);
-
-               if (type == CONNECTION_PROFILE_TYPE_ETHERNET || type == CONNECTION_PROFILE_TYPE_BT) {
-                       ret = connection_remove_profile(connection, profile_temp);
-                       CHECK_RETURN("connection_remove_profile", ret, CONNECTION_ERROR_INVALID_PARAMETER);
-               } else {
-                       ret = connection_remove_profile(connection, profile_temp);
-                       CHECK_RETURN("connection_remove_profile", ret, CONNECTION_ERROR_NONE);
-               }
+               /**
+                * The purpose of this TC is to remove the added profile in the utc_connection_add_profile_p
+                * and this scenario only works with telephony profile.
+                */
+               connection_cellular_state_e state;
+               ret = connection_get_cellular_state(connection, &state);
+               CHECK_RETURN("connection_get_cellular_state", ret, CONNECTION_ERROR_NOT_SUPPORTED);
        }
 
        return 0;