From 284cce0405e571d3f25546c11e6ec425aa294e5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Wed, 28 Aug 2013 10:23:49 +0200 Subject: [PATCH] test: remove deprecated 'security' property from tests Adjust tests not to use deprecated 'security' property. --- libnm-util/tests/test-secrets.c | 1 - .../plugins/ifcfg-rh/tests/test-ifcfg-rh.c | 198 +----------------- .../keyfiles/Test_New_Wireless_Group_Names | 1 - .../plugins/keyfile/tests/test-keyfile.c | 8 - .../tests/test-supplicant-config.c | 2 - src/tests/test-wifi-ap-utils.c | 21 +- 6 files changed, 13 insertions(+), 218 deletions(-) diff --git a/libnm-util/tests/test-secrets.c b/libnm-util/tests/test-secrets.c index f770d53e3e..5a18bebe6d 100644 --- a/libnm-util/tests/test-secrets.c +++ b/libnm-util/tests/test-secrets.c @@ -426,7 +426,6 @@ wifi_connection_new (void) g_byte_array_append (ssid, &tmpssid[0], sizeof (tmpssid)); g_object_set (s_wifi, NM_SETTING_WIRELESS_SSID, ssid, - NM_SETTING_WIRELESS_SEC, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, NULL); g_byte_array_free (ssid, TRUE); nm_connection_add_setting (connection, NM_SETTING (s_wifi)); diff --git a/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c b/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c index 336899a71b..9b9d474ac9 100644 --- a/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c +++ b/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c @@ -2623,6 +2623,7 @@ test_read_wifi_open (void) NMConnection *connection; NMSettingConnection *s_con; NMSettingWireless *s_wireless; + NMSettingWirelessSecurity *s_wsec; NMSettingIP4Config *s_ip4; char *unmanaged = NULL; char *keyfile = NULL; @@ -2762,18 +2763,16 @@ test_read_wifi_open (void) NM_SETTING_WIRELESS_SETTING_NAME, NM_SETTING_WIRELESS_MODE); - ASSERT (nm_setting_wireless_get_security (s_wireless) == NULL, - "wifi-open-verify-wireless", "failed to verify %s: unexpected %s / %s key value", - TEST_IFCFG_WIFI_OPEN, - NM_SETTING_WIRELESS_SETTING_NAME, - NM_SETTING_WIRELESS_SEC); - ASSERT (nm_setting_wireless_get_channel (s_wireless) == expected_channel, "wifi-open-verify-wireless", "failed to verify %s: unexpected %s / %s key value", TEST_IFCFG_WIFI_OPEN, NM_SETTING_WIRELESS_SETTING_NAME, NM_SETTING_WIRELESS_CHANNEL); + /* ===== WiFi SECURITY SETTING ===== */ + s_wsec = nm_connection_get_setting_wireless_security (connection); + g_assert (s_wsec == NULL); + /* ===== IPv4 SETTING ===== */ s_ip4 = nm_connection_get_setting_ip4_config (connection); @@ -3248,20 +3247,6 @@ test_read_wifi_wep (void) NM_SETTING_WIRELESS_SETTING_NAME, NM_SETTING_WIRELESS_CHANNEL); - /* Security */ - tmp = nm_setting_wireless_get_security (s_wireless); - ASSERT (tmp != NULL, - "wifi-wep-verify-wireless", "failed to verify %s: missing %s / %s key", - TEST_IFCFG_WIFI_WEP, - NM_SETTING_WIRELESS_SETTING_NAME, - NM_SETTING_WIRELESS_SEC); - ASSERT (strcmp (tmp, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME) == 0, - "wifi-wep-verify-wireless", "failed to verify %s: unexpected %s / %s key value", - TEST_IFCFG_WIFI_WEP, - NM_SETTING_WIRELESS_SETTING_NAME, - NM_SETTING_WIRELESS_SEC); - - /* ===== WIRELESS SECURITY SETTING ===== */ s_wsec = nm_connection_get_setting_wireless_security (connection); @@ -3492,20 +3477,6 @@ test_read_wifi_wep_adhoc (void) NM_SETTING_WIRELESS_SETTING_NAME, NM_SETTING_WIRELESS_CHANNEL); - /* Security */ - tmp = nm_setting_wireless_get_security (s_wireless); - ASSERT (tmp != NULL, - "wifi-wep-adhoc-verify-wireless", "failed to verify %s: missing %s / %s key", - TEST_IFCFG_WIFI_WEP_ADHOC, - NM_SETTING_WIRELESS_SETTING_NAME, - NM_SETTING_WIRELESS_SEC); - ASSERT (strcmp (tmp, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME) == 0, - "wifi-wep-adhoc-verify-wireless", "failed to verify %s: unexpected %s / %s key value", - TEST_IFCFG_WIFI_WEP_ADHOC, - NM_SETTING_WIRELESS_SETTING_NAME, - NM_SETTING_WIRELESS_SEC); - - /* ===== WIRELESS SECURITY SETTING ===== */ s_wsec = nm_connection_get_setting_wireless_security (connection); @@ -3685,20 +3656,6 @@ test_read_wifi_wep_passphrase (void) TEST_IFCFG_WIFI_WEP_PASSPHRASE, NM_SETTING_WIRELESS_SETTING_NAME); - /* Security */ - tmp = nm_setting_wireless_get_security (s_wireless); - ASSERT (tmp != NULL, - "wifi-wep-passphrase-verify-wireless", "failed to verify %s: missing %s / %s key", - TEST_IFCFG_WIFI_WEP_PASSPHRASE, - NM_SETTING_WIRELESS_SETTING_NAME, - NM_SETTING_WIRELESS_SEC); - ASSERT (strcmp (tmp, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME) == 0, - "wifi-wep-passphrase-verify-wireless", "failed to verify %s: unexpected %s / %s key value", - TEST_IFCFG_WIFI_WEP_PASSPHRASE, - NM_SETTING_WIRELESS_SETTING_NAME, - NM_SETTING_WIRELESS_SEC); - - /* ===== WIRELESS SECURITY SETTING ===== */ s_wsec = nm_connection_get_setting_wireless_security (connection); @@ -3823,19 +3780,6 @@ test_read_wifi_wep_40_ascii (void) TEST_IFCFG_WIFI_WEP_40_ASCII, NM_SETTING_WIRELESS_SETTING_NAME); - /* Security */ - tmp = nm_setting_wireless_get_security (s_wireless); - ASSERT (tmp != NULL, - "wifi-wep-40-ascii-verify-wireless", "failed to verify %s: missing %s / %s key", - TEST_IFCFG_WIFI_WEP_40_ASCII, - NM_SETTING_WIRELESS_SETTING_NAME, - NM_SETTING_WIRELESS_SEC); - ASSERT (strcmp (tmp, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME) == 0, - "wifi-wep-40-ascii-verify-wireless", "failed to verify %s: unexpected %s / %s key value", - TEST_IFCFG_WIFI_WEP_40_ASCII, - NM_SETTING_WIRELESS_SETTING_NAME, - NM_SETTING_WIRELESS_SEC); - /* ===== WIRELESS SECURITY SETTING ===== */ s_wsec = nm_connection_get_setting_wireless_security (connection); @@ -3960,19 +3904,6 @@ test_read_wifi_wep_104_ascii (void) TEST_IFCFG_WIFI_WEP_104_ASCII, NM_SETTING_WIRELESS_SETTING_NAME); - /* Security */ - tmp = nm_setting_wireless_get_security (s_wireless); - ASSERT (tmp != NULL, - "wifi-wep-104-ascii-verify-wireless", "failed to verify %s: missing %s / %s key", - TEST_IFCFG_WIFI_WEP_104_ASCII, - NM_SETTING_WIRELESS_SETTING_NAME, - NM_SETTING_WIRELESS_SEC); - ASSERT (strcmp (tmp, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME) == 0, - "wifi-wep-104-ascii-verify-wireless", "failed to verify %s: unexpected %s / %s key value", - TEST_IFCFG_WIFI_WEP_104_ASCII, - NM_SETTING_WIRELESS_SETTING_NAME, - NM_SETTING_WIRELESS_SEC); - /* ===== WIRELESS SECURITY SETTING ===== */ s_wsec = nm_connection_get_setting_wireless_security (connection); @@ -4111,20 +4042,6 @@ test_read_wifi_leap (void) TEST_IFCFG_WIFI_LEAP, NM_SETTING_WIRELESS_SETTING_NAME); - /* Security */ - tmp = nm_setting_wireless_get_security (s_wireless); - ASSERT (tmp != NULL, - "wifi-leap-verify-wireless", "failed to verify %s: missing %s / %s key", - TEST_IFCFG_WIFI_LEAP, - NM_SETTING_WIRELESS_SETTING_NAME, - NM_SETTING_WIRELESS_SEC); - ASSERT (strcmp (tmp, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME) == 0, - "wifi-leap-verify-wireless", "failed to verify %s: unexpected %s / %s key value", - TEST_IFCFG_WIFI_LEAP, - NM_SETTING_WIRELESS_SETTING_NAME, - NM_SETTING_WIRELESS_SEC); - - /* ===== WIRELESS SECURITY SETTING ===== */ s_wsec = nm_connection_get_setting_wireless_security (connection); @@ -4225,8 +4142,6 @@ test_read_wifi_leap_secret_flags (const char *file, NMSettingSecretFlags expecte s_wifi = nm_connection_get_setting_wireless (connection); g_assert (s_wifi); - g_assert (g_strcmp0 (nm_setting_wireless_get_security (s_wifi), NM_SETTING_WIRELESS_SECURITY_SETTING_NAME) == 0); - /* ===== WIRELESS SECURITY SETTING ===== */ s_wsec = nm_connection_get_setting_wireless_security (connection); g_assert (s_wsec); @@ -4415,19 +4330,6 @@ test_read_wifi_wpa_psk (void) NM_SETTING_WIRELESS_SETTING_NAME, NM_SETTING_WIRELESS_CHANNEL); - /* Security */ - tmp = nm_setting_wireless_get_security (s_wireless); - ASSERT (tmp != NULL, - "wifi-wpa-psk-verify-wireless", "failed to verify %s: missing %s / %s key", - TEST_IFCFG_WIFI_WPA_PSK, - NM_SETTING_WIRELESS_SETTING_NAME, - NM_SETTING_WIRELESS_SEC); - ASSERT (strcmp (tmp, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME) == 0, - "wifi-wpa-psk-verify-wireless", "failed to verify %s: unexpected %s / %s key value", - TEST_IFCFG_WIFI_WPA_PSK, - NM_SETTING_WIRELESS_SETTING_NAME, - NM_SETTING_WIRELESS_SEC); - /* ===== WIRELESS SECURITY SETTING ===== */ s_wsec = nm_connection_get_setting_wireless_security (connection); @@ -4628,19 +4530,6 @@ test_read_wifi_wpa_psk_2 (void) TEST_IFCFG_WIFI_WPA_PSK_2, NM_SETTING_WIRELESS_SETTING_NAME); - /* Security */ - tmp = nm_setting_wireless_get_security (s_wireless); - ASSERT (tmp != NULL, - "wifi-wpa-psk-2-verify-wireless", "failed to verify %s: missing %s / %s key", - TEST_IFCFG_WIFI_WPA_PSK_2, - NM_SETTING_WIRELESS_SETTING_NAME, - NM_SETTING_WIRELESS_SEC); - ASSERT (strcmp (tmp, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME) == 0, - "wifi-wpa-psk-2-verify-wireless", "failed to verify %s: unexpected %s / %s key value", - TEST_IFCFG_WIFI_WPA_PSK_2, - NM_SETTING_WIRELESS_SETTING_NAME, - NM_SETTING_WIRELESS_SEC); - /* ===== WIRELESS SECURITY SETTING ===== */ s_wsec = nm_connection_get_setting_wireless_security (connection); @@ -4733,19 +4622,6 @@ test_read_wifi_wpa_psk_unquoted (void) TEST_IFCFG_WIFI_WPA_PSK_UNQUOTED, NM_SETTING_WIRELESS_SETTING_NAME); - /* Security */ - tmp = nm_setting_wireless_get_security (s_wireless); - ASSERT (tmp != NULL, - "wifi-wpa-psk-unquoted-verify-wireless", "failed to verify %s: missing %s / %s key", - TEST_IFCFG_WIFI_WPA_PSK_UNQUOTED, - NM_SETTING_WIRELESS_SETTING_NAME, - NM_SETTING_WIRELESS_SEC); - ASSERT (strcmp (tmp, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME) == 0, - "wifi-wpa-psk-unquoted-verify-wireless", "failed to verify %s: unexpected %s / %s key value", - TEST_IFCFG_WIFI_WPA_PSK_UNQUOTED, - NM_SETTING_WIRELESS_SETTING_NAME, - NM_SETTING_WIRELESS_SEC); - /* ===== WIRELESS SECURITY SETTING ===== */ s_wsec = nm_connection_get_setting_wireless_security (connection); @@ -4893,19 +4769,6 @@ test_read_wifi_wpa_psk_adhoc (void) NM_SETTING_WIRELESS_SETTING_NAME, NM_SETTING_WIRELESS_MODE); - /* Security */ - tmp = nm_setting_wireless_get_security (s_wireless); - ASSERT (tmp != NULL, - "wifi-wpa-psk-adhoc-verify-wireless", "failed to verify %s: missing %s / %s key", - TEST_IFCFG_WIFI_WPA_PSK_ADHOC, - NM_SETTING_WIRELESS_SETTING_NAME, - NM_SETTING_WIRELESS_SEC); - ASSERT (strcmp (tmp, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME) == 0, - "wifi-wpa-psk-adhoc-verify-wireless", "failed to verify %s: unexpected %s / %s key value", - TEST_IFCFG_WIFI_WPA_PSK_ADHOC, - NM_SETTING_WIRELESS_SETTING_NAME, - NM_SETTING_WIRELESS_SEC); - /* ===== WIRELESS SECURITY SETTING ===== */ s_wsec = nm_connection_get_setting_wireless_security (connection); @@ -5089,19 +4952,6 @@ test_read_wifi_wpa_psk_hex (void) NM_SETTING_WIRELESS_SETTING_NAME, NM_SETTING_WIRELESS_SSID); - /* Security */ - tmp = nm_setting_wireless_get_security (s_wireless); - ASSERT (tmp != NULL, - "wifi-wpa-psk-hex-verify-wireless", "failed to verify %s: missing %s / %s key", - TEST_IFCFG_WIFI_WPA_PSK_HEX, - NM_SETTING_WIRELESS_SETTING_NAME, - NM_SETTING_WIRELESS_SEC); - ASSERT (strcmp (tmp, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME) == 0, - "wifi-wpa-psk-hex-verify-wireless", "failed to verify %s: unexpected %s / %s key value", - TEST_IFCFG_WIFI_WPA_PSK_HEX, - NM_SETTING_WIRELESS_SETTING_NAME, - NM_SETTING_WIRELESS_SEC); - /* ===== WIRELESS SECURITY SETTING ===== */ s_wsec = nm_connection_get_setting_wireless_security (connection); @@ -5499,8 +5349,6 @@ test_read_wifi_dynamic_wep_leap (void) s_wifi = nm_connection_get_setting_wireless (connection); g_assert (s_wifi); - g_assert_cmpstr (nm_setting_wireless_get_security (s_wifi), ==, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME); - /* ===== WiFi SECURITY SETTING ===== */ s_wsec = nm_connection_get_setting_wireless_security (connection); g_assert (s_wsec); @@ -6016,20 +5864,6 @@ test_read_wifi_wep_no_keys (void) TEST_IFCFG_WIFI_WEP_NO_KEYS, NM_SETTING_WIRELESS_SETTING_NAME); - /* Security */ - tmp = nm_setting_wireless_get_security (s_wireless); - ASSERT (tmp != NULL, - "wifi-wep-no-keys-verify-wireless", "failed to verify %s: missing %s / %s key", - TEST_IFCFG_WIFI_WEP_NO_KEYS, - NM_SETTING_WIRELESS_SETTING_NAME, - NM_SETTING_WIRELESS_SEC); - ASSERT (strcmp (tmp, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME) == 0, - "wifi-wep-no-keys-verify-wireless", "failed to verify %s: unexpected %s / %s key value", - TEST_IFCFG_WIFI_WEP_NO_KEYS, - NM_SETTING_WIRELESS_SETTING_NAME, - NM_SETTING_WIRELESS_SEC); - - /* ===== WIRELESS SECURITY SETTING ===== */ s_wsec = nm_connection_get_setting_wireless_security (connection); @@ -6162,7 +5996,6 @@ test_read_wifi_wep_agent_keys (void) char *route6file = NULL; gboolean ignore_error = FALSE; GError *error = NULL; - const char *tmp; NMWepKeyType key_type; gboolean success; NMSettingSecretFlags flags; @@ -6190,8 +6023,6 @@ test_read_wifi_wep_agent_keys (void) /* ===== WIRELESS SETTING ===== */ s_wifi = nm_connection_get_setting_wireless (connection); g_assert (s_wifi); - tmp = nm_setting_wireless_get_security (s_wifi); - g_assert (g_strcmp0 (tmp, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME) == 0); /* ===== WIRELESS SECURITY SETTING ===== */ s_wsec = nm_connection_get_setting_wireless_security (connection); @@ -7810,7 +7641,6 @@ test_write_wifi_wep (void) g_object_set (s_wifi, NM_SETTING_WIRELESS_SSID, ssid, NM_SETTING_WIRELESS_MODE, "infrastructure", - NM_SETTING_WIRELESS_SEC, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, NULL); g_byte_array_free (ssid, TRUE); @@ -7956,7 +7786,6 @@ test_write_wifi_wep_adhoc (void) g_object_set (s_wifi, NM_SETTING_WIRELESS_SSID, ssid, NM_SETTING_WIRELESS_MODE, "adhoc", - NM_SETTING_WIRELESS_SEC, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, NULL); g_byte_array_free (ssid, TRUE); @@ -8100,7 +7929,6 @@ test_write_wifi_wep_passphrase (void) g_object_set (s_wifi, NM_SETTING_WIRELESS_SSID, ssid, NM_SETTING_WIRELESS_MODE, "infrastructure", - NM_SETTING_WIRELESS_SEC, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, NULL); g_byte_array_free (ssid, TRUE); @@ -8239,7 +8067,6 @@ test_write_wifi_wep_40_ascii (void) g_object_set (s_wifi, NM_SETTING_WIRELESS_SSID, ssid, NM_SETTING_WIRELESS_MODE, "infrastructure", - NM_SETTING_WIRELESS_SEC, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, NULL); g_byte_array_free (ssid, TRUE); @@ -8380,7 +8207,6 @@ test_write_wifi_wep_104_ascii (void) g_object_set (s_wifi, NM_SETTING_WIRELESS_SSID, ssid, NM_SETTING_WIRELESS_MODE, "infrastructure", - NM_SETTING_WIRELESS_SEC, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, NULL); g_byte_array_free (ssid, TRUE); @@ -8521,7 +8347,6 @@ test_write_wifi_leap (void) g_object_set (s_wifi, NM_SETTING_WIRELESS_SSID, ssid, NM_SETTING_WIRELESS_MODE, "infrastructure", - NM_SETTING_WIRELESS_SEC, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, NULL); g_byte_array_free (ssid, TRUE); @@ -8659,7 +8484,6 @@ test_write_wifi_leap_secret_flags (NMSettingSecretFlags flags) g_object_set (s_wifi, NM_SETTING_WIRELESS_SSID, ssid, NM_SETTING_WIRELESS_MODE, "infrastructure", - NM_SETTING_WIRELESS_SEC, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, NULL); g_byte_array_free (ssid, TRUE); @@ -8799,7 +8623,6 @@ test_write_wifi_wpa_psk (const char *name, g_object_set (s_wifi, NM_SETTING_WIRELESS_SSID, ssid, NM_SETTING_WIRELESS_MODE, "infrastructure", - NM_SETTING_WIRELESS_SEC, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, NULL); g_byte_array_free (ssid, TRUE); @@ -8948,7 +8771,6 @@ test_write_wifi_wpa_psk_adhoc (void) g_object_set (s_wifi, NM_SETTING_WIRELESS_SSID, ssid, NM_SETTING_WIRELESS_MODE, "adhoc", - NM_SETTING_WIRELESS_SEC, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, NM_SETTING_WIRELESS_CHANNEL, 11, NM_SETTING_WIRELESS_BAND, "bg", NULL); @@ -9091,7 +8913,6 @@ test_write_wifi_wpa_eap_tls (void) g_object_set (s_wifi, NM_SETTING_WIRELESS_SSID, ssid, NM_SETTING_WIRELESS_MODE, "infrastructure", - NM_SETTING_WIRELESS_SEC, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, NULL); g_byte_array_free (ssid, TRUE); @@ -9255,7 +9076,6 @@ test_write_wifi_wpa_eap_ttls_tls (void) g_object_set (s_wifi, NM_SETTING_WIRELESS_SSID, ssid, NM_SETTING_WIRELESS_MODE, "infrastructure", - NM_SETTING_WIRELESS_SEC, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, NULL); g_byte_array_free (ssid, TRUE); @@ -9437,7 +9257,6 @@ test_write_wifi_wpa_eap_ttls_mschapv2 (void) g_object_set (s_wifi, NM_SETTING_WIRELESS_SSID, ssid, NM_SETTING_WIRELESS_MODE, "infrastructure", - NM_SETTING_WIRELESS_SEC, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, NULL); g_byte_array_free (ssid, TRUE); @@ -9597,7 +9416,6 @@ test_write_wifi_wpa_then_open (void) g_object_set (s_wifi, NM_SETTING_WIRELESS_SSID, ssid, NM_SETTING_WIRELESS_MODE, "infrastructure", - NM_SETTING_WIRELESS_SEC, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, NULL); g_byte_array_free (ssid, TRUE); @@ -9679,9 +9497,6 @@ test_write_wifi_wpa_then_open (void) g_object_unref (reread); /* Now change the connection to open and recheck */ - s_wifi = nm_connection_get_setting_wireless (connection); - g_assert (s_wifi); - g_object_set (s_wifi, NM_SETTING_WIRELESS_SEC, NULL, NULL); nm_connection_remove_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY); /* Write it back out */ @@ -9794,7 +9609,6 @@ test_write_wifi_wpa_then_wep_with_perms (void) g_object_set (s_wifi, NM_SETTING_WIRELESS_SSID, ssid, NM_SETTING_WIRELESS_MODE, "infrastructure", - NM_SETTING_WIRELESS_SEC, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, NULL); g_byte_array_free (ssid, TRUE); @@ -9987,7 +9801,6 @@ test_write_wifi_dynamic_wep_leap (void) g_object_set (s_wifi, NM_SETTING_WIRELESS_SSID, ssid, NM_SETTING_WIRELESS_MODE, "infrastructure", - NM_SETTING_WIRELESS_SEC, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, NULL); g_byte_array_free (ssid, TRUE); @@ -10903,7 +10716,6 @@ test_write_wifi_wep_agent_keys (void) g_byte_array_append (ssid, (guint8 *) str_ssid, strlen (str_ssid)); g_object_set (s_wifi, NM_SETTING_WIRELESS_SSID, ssid, - NM_SETTING_WIRELESS_SEC, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, NM_SETTING_WIRELESS_MODE, "infrastructure", NULL); g_byte_array_free (ssid, TRUE); diff --git a/src/settings/plugins/keyfile/tests/keyfiles/Test_New_Wireless_Group_Names b/src/settings/plugins/keyfile/tests/keyfiles/Test_New_Wireless_Group_Names index 0752f56df3..d9ac586496 100644 --- a/src/settings/plugins/keyfile/tests/keyfiles/Test_New_Wireless_Group_Names +++ b/src/settings/plugins/keyfile/tests/keyfiles/Test_New_Wireless_Group_Names @@ -6,7 +6,6 @@ type=wifi [wifi] ssid=foobar mode=infrastructure -security=wifi-security [wifi-security] key-mgmt=wpa-psk diff --git a/src/settings/plugins/keyfile/tests/test-keyfile.c b/src/settings/plugins/keyfile/tests/test-keyfile.c index 4c9e1eae1c..9fdb381d80 100644 --- a/src/settings/plugins/keyfile/tests/test-keyfile.c +++ b/src/settings/plugins/keyfile/tests/test-keyfile.c @@ -3130,8 +3130,6 @@ test_read_new_wireless_group_names (void) g_assert_cmpstr (nm_setting_wireless_get_mode (s_wifi), ==, NM_SETTING_WIRELESS_MODE_INFRA); - g_assert_cmpstr (nm_setting_wireless_get_security (s_wifi), ==, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME); - /* Wifi security setting */ s_wsec = nm_connection_get_setting_wireless_security (connection); g_assert (s_wsec); @@ -3184,7 +3182,6 @@ test_write_new_wireless_group_names (void) g_byte_array_append (ssid, &tmpssid[0], sizeof (tmpssid)); g_object_set (s_wifi, NM_SETTING_WIRELESS_SSID, ssid, - NM_SETTING_WIRELESS_SEC, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, NM_SETTING_WIRELESS_MODE, NM_SETTING_WIRELESS_MODE_INFRA, NULL); g_byte_array_free (ssid, TRUE); @@ -3228,11 +3225,6 @@ test_write_new_wireless_group_names (void) g_assert_cmpstr (s, ==, NM_SETTING_WIRELESS_MODE_INFRA); g_free (s); - s = g_key_file_get_string (kf, "wifi", NM_SETTING_WIRELESS_SEC, &error); - g_assert_no_error (error); - g_assert_cmpstr (s, ==, "wifi-security"); - g_free (s); - s = g_key_file_get_string (kf, "wifi-security", NM_SETTING_WIRELESS_SECURITY_PSK, &error); g_assert_no_error (error); g_assert_cmpstr (s, ==, expected_psk); diff --git a/src/supplicant-manager/tests/test-supplicant-config.c b/src/supplicant-manager/tests/test-supplicant-config.c index 5c6795cc81..95da39293d 100644 --- a/src/supplicant-manager/tests/test-supplicant-config.c +++ b/src/supplicant-manager/tests/test-supplicant-config.c @@ -245,7 +245,6 @@ test_wifi_wep_key (const char *detail, NM_SETTING_WIRELESS_BSSID, bssid, NM_SETTING_WIRELESS_MODE, "infrastructure", NM_SETTING_WIRELESS_BAND, "bg", - NM_SETTING_WIRELESS_SEC, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, NULL); g_byte_array_free (ssid, TRUE); @@ -373,7 +372,6 @@ test_wifi_wpa_psk (const char *detail, NM_SETTING_WIRELESS_BSSID, bssid, NM_SETTING_WIRELESS_MODE, "infrastructure", NM_SETTING_WIRELESS_BAND, "bg", - NM_SETTING_WIRELESS_SEC, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, NULL); g_byte_array_free (ssid, TRUE); diff --git a/src/tests/test-wifi-ap-utils.c b/src/tests/test-wifi-ap-utils.c index de4c7e0099..23e9a525cb 100644 --- a/src/tests/test-wifi-ap-utils.c +++ b/src/tests/test-wifi-ap-utils.c @@ -218,8 +218,7 @@ fill_8021x (NMConnection *connection, const KeyData items[]) static NMConnection * create_basic (const char *ssid, const guint8 *bssid, - NM80211Mode mode, - gboolean set_security) + NM80211Mode mode) { NMConnection *connection; NMSettingWireless *s_wifi = NULL; @@ -251,9 +250,6 @@ create_basic (const char *ssid, else g_assert_not_reached (); - if (set_security) - g_object_set (G_OBJECT (s_wifi), NM_SETTING_WIRELESS_SEC, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, NULL); - return connection; } @@ -274,7 +270,7 @@ test_lock_bssid (void) NM_802_11_AP_SEC_NONE, NM_802_11_AP_SEC_NONE, TRUE, src, &error); - expected = create_basic (ssid, bssid, NM_802_11_MODE_INFRA, FALSE); + expected = create_basic (ssid, bssid, NM_802_11_MODE_INFRA); COMPARE (src, expected, success, error, 0, 0); g_object_unref (src); @@ -302,7 +298,7 @@ test_open_ap_empty_connection (void) NM_802_11_AP_SEC_NONE, NM_802_11_AP_SEC_NONE, FALSE, src, &error); - expected = create_basic (ssid, NULL, NM_802_11_MODE_INFRA, FALSE); + expected = create_basic (ssid, NULL, NM_802_11_MODE_INFRA); COMPARE (src, expected, success, error, 0, 0); g_object_unref (src); @@ -422,7 +418,6 @@ test_ap_wpa_psk_connection_base (const char *key_mgmt, const KeyData exp_wifi[] = { { NM_SETTING_WIRELESS_SSID, ssid, 0 }, { NM_SETTING_WIRELESS_MODE, "infrastructure", 0 }, - { NM_SETTING_WIRELESS_SEC, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, 0 }, { NULL } }; const KeyData both_wsec[] = { { NM_SETTING_WIRELESS_SECURITY_KEY_MGMT, key_mgmt, 0 }, @@ -755,7 +750,7 @@ test_priv_ap_empty_connection (void) src, &error); /* Static WEP connection expected */ - expected = create_basic (ssid, NULL, NM_802_11_MODE_INFRA, TRUE); + expected = create_basic (ssid, NULL, NM_802_11_MODE_INFRA); fill_wsec (expected, exp_wsec); COMPARE (src, expected, success, error, 0, 0); @@ -802,7 +797,7 @@ test_priv_ap_leap_connection_1 (gconstpointer add_wifi) * there's no way to determine from the AP's beacon whether it's static WEP, * dynamic WEP, or LEAP. */ - expected = create_basic (ssid, NULL, NM_802_11_MODE_INFRA, TRUE); + expected = create_basic (ssid, NULL, NM_802_11_MODE_INFRA); fill_wsec (expected, exp_wsec); COMPARE (src, expected, success, error, 0, 0); @@ -886,7 +881,7 @@ test_priv_ap_dynamic_wep_1 (void) src, &error); /* We expect a completed Dynamic WEP connection */ - expected = create_basic (ssid, NULL, NM_802_11_MODE_INFRA, TRUE); + expected = create_basic (ssid, NULL, NM_802_11_MODE_INFRA); fill_wsec (expected, exp_wsec); fill_8021x (expected, both_8021x); COMPARE (src, expected, success, error, 0, 0); @@ -937,7 +932,7 @@ test_priv_ap_dynamic_wep_2 (void) src, &error); /* We expect a completed Dynamic WEP connection */ - expected = create_basic (ssid, NULL, NM_802_11_MODE_INFRA, TRUE); + expected = create_basic (ssid, NULL, NM_802_11_MODE_INFRA); fill_wsec (expected, exp_wsec); fill_8021x (expected, both_8021x); COMPARE (src, expected, success, error, 0, 0); @@ -1086,7 +1081,7 @@ test_wpa_ap_empty_connection (gconstpointer data) FALSE, src, &error); /* WPA connection expected */ - expected = create_basic (ssid, NULL, NM_802_11_MODE_INFRA, TRUE); + expected = create_basic (ssid, NULL, NM_802_11_MODE_INFRA); fill_wsec (expected, exp_wsec); COMPARE (src, expected, success, error, 0, 0);