summaryrefslogtreecommitdiff
path: root/dispatcher
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-06-18 14:32:10 +0200
committerThomas Haller <thaller@redhat.com>2018-06-18 15:43:38 +0200
commit456789007222273c383204ad50f8da18d0bab485 (patch)
tree2d017eca5df248d1bda4c64edaccdfb7a313bb20 /dispatcher
parentba240bb7dcef9d9dd20a4ab5884d514b6da3793e (diff)
dispatcher/tests: fix test after adding NM_DISPATCHER_ACTION
Also, fix existing tests regarding connectivity action. Fixes: ce9619047c5daac9a006d16d07453d50e0520e71 (cherry picked from commit 6dec8ea9f3df5089325cafeb4848bcb004cb7c79)
Diffstat (limited to 'dispatcher')
-rw-r--r--dispatcher/tests/dispatcher-connectivity-full10
-rw-r--r--dispatcher/tests/dispatcher-connectivity-unknown10
-rw-r--r--dispatcher/tests/dispatcher-down1
-rw-r--r--dispatcher/tests/dispatcher-external1
-rw-r--r--dispatcher/tests/dispatcher-up1
-rw-r--r--dispatcher/tests/dispatcher-vpn-down1
-rw-r--r--dispatcher/tests/dispatcher-vpn-up1
-rw-r--r--dispatcher/tests/test-dispatcher-envp.c4
8 files changed, 10 insertions, 19 deletions
diff --git a/dispatcher/tests/dispatcher-connectivity-full b/dispatcher/tests/dispatcher-connectivity-full
index 0b2796d12..937e79d75 100644
--- a/dispatcher/tests/dispatcher-connectivity-full
+++ b/dispatcher/tests/dispatcher-connectivity-full
@@ -1,6 +1,5 @@
[main]
-action=connectiviy-change
-expected-iface=wlan0
+action=connectivity-change
uuid=3fd2a33a-d81b-423f-ae99-e6baba742311
id=Random Connection
connectivity-state=FULL
@@ -14,10 +13,5 @@ path=/org/freedesktop/NetworkManager/Devices/0
[env]
PATH=
-CONNECTION_UUID=3fd2a33a-d81b-423f-ae99-e6baba742311
-CONNECTION_DBUS_PATH=/org/freedesktop/NetworkManager/Connections/5
-CONNECTION_ID=Random Connection
-CONNECTION_FILENAME=/dispatcher/tests/dispatcher-connectivity-full
-DEVICE_IFACE=wlan0
-DEVICE_IP_IFACE=wlan0
+NM_DISPATCHER_ACTION=connectivity-change
CONNECTIVITY_STATE=FULL
diff --git a/dispatcher/tests/dispatcher-connectivity-unknown b/dispatcher/tests/dispatcher-connectivity-unknown
index 4d797712a..9aa48e4a1 100644
--- a/dispatcher/tests/dispatcher-connectivity-unknown
+++ b/dispatcher/tests/dispatcher-connectivity-unknown
@@ -1,6 +1,5 @@
[main]
-action=connectiviy-change
-expected-iface=wlan0
+action=connectivity-change
uuid=3fd2a33a-d81b-423f-ae99-e6baba742311
id=Random Connection
connectivity-state=UNKNOWN
@@ -14,9 +13,4 @@ path=/org/freedesktop/NetworkManager/Devices/0
[env]
PATH=
-CONNECTION_UUID=3fd2a33a-d81b-423f-ae99-e6baba742311
-CONNECTION_DBUS_PATH=/org/freedesktop/NetworkManager/Connections/5
-CONNECTION_ID=Random Connection
-CONNECTION_FILENAME=/dispatcher/tests/dispatcher-connectivity-unknown
-DEVICE_IFACE=wlan0
-DEVICE_IP_IFACE=wlan0
+NM_DISPATCHER_ACTION=connectivity-change
diff --git a/dispatcher/tests/dispatcher-down b/dispatcher/tests/dispatcher-down
index e0e44a723..8e2a28187 100644
--- a/dispatcher/tests/dispatcher-down
+++ b/dispatcher/tests/dispatcher-down
@@ -13,6 +13,7 @@ path=/org/freedesktop/NetworkManager/Devices/0
[env]
PATH=
+NM_DISPATCHER_ACTION=down
CONNECTION_UUID=3fd2a33a-d81b-423f-ae99-e6baba742311
CONNECTION_DBUS_PATH=/org/freedesktop/NetworkManager/Connections/5
CONNECTION_ID=Random Connection
diff --git a/dispatcher/tests/dispatcher-external b/dispatcher/tests/dispatcher-external
index 41f01d463..46d6c7971 100644
--- a/dispatcher/tests/dispatcher-external
+++ b/dispatcher/tests/dispatcher-external
@@ -23,6 +23,7 @@ gateway=0.0.0.0
[env]
PATH=
+NM_DISPATCHER_ACTION=up
CONNECTION_UUID=92bbc2fb-7304-46be-8ebb-6093dbe19a6a
CONNECTION_DBUS_PATH=/org/freedesktop/NetworkManager/Connections/5
CONNECTION_FILENAME=/dispatcher/tests/dispatcher-external
diff --git a/dispatcher/tests/dispatcher-up b/dispatcher/tests/dispatcher-up
index ad7e87d3b..0a27e3de5 100644
--- a/dispatcher/tests/dispatcher-up
+++ b/dispatcher/tests/dispatcher-up
@@ -36,6 +36,7 @@ domains=hsd1.mn.comcast.net.
[env]
PATH=
+NM_DISPATCHER_ACTION=up
CONNECTION_UUID=3fd2a33a-d81b-423f-ae99-e6baba742311
CONNECTION_DBUS_PATH=/org/freedesktop/NetworkManager/Connections/5
CONNECTION_ID=Random Connection
diff --git a/dispatcher/tests/dispatcher-vpn-down b/dispatcher/tests/dispatcher-vpn-down
index c921f105d..e439668fe 100644
--- a/dispatcher/tests/dispatcher-vpn-down
+++ b/dispatcher/tests/dispatcher-vpn-down
@@ -36,6 +36,7 @@ domains=hsd1.mn.comcast.net.
[env]
PATH=
+NM_DISPATCHER_ACTION=vpn-down
CONNECTION_UUID=355653c0-34d3-4777-ad25-f9a498b7ef8e
CONNECTION_DBUS_PATH=/org/freedesktop/NetworkManager/Connections/5
CONNECTION_ID=Random Connection
diff --git a/dispatcher/tests/dispatcher-vpn-up b/dispatcher/tests/dispatcher-vpn-up
index cbafc0313..09c94c1c9 100644
--- a/dispatcher/tests/dispatcher-vpn-up
+++ b/dispatcher/tests/dispatcher-vpn-up
@@ -36,6 +36,7 @@ domains=hsd1.mn.comcast.net.
[env]
PATH=
+NM_DISPATCHER_ACTION=vpn-up
CONNECTION_UUID=355653c0-34d3-4777-ad25-f9a498b7ef8e
CONNECTION_DBUS_PATH=/org/freedesktop/NetworkManager/Connections/5
CONNECTION_ID=Random Connection
diff --git a/dispatcher/tests/test-dispatcher-envp.c b/dispatcher/tests/test-dispatcher-envp.c
index 1203c6ac0..5fa4a3149 100644
--- a/dispatcher/tests/test-dispatcher-envp.c
+++ b/dispatcher/tests/test-dispatcher-envp.c
@@ -66,9 +66,7 @@ parse_main (GKeyFile *kf,
NMSettingConnection *s_con;
GVariantBuilder props;
- *out_expected_iface = g_key_file_get_string (kf, "main", "expected-iface", error);
- if (*out_expected_iface == NULL)
- return FALSE;
+ *out_expected_iface = g_key_file_get_string (kf, "main", "expected-iface", NULL);
*out_connectivity_state = g_key_file_get_string (kf, "main", "connectivity-state", NULL);
*out_vpn_ip_iface = g_key_file_get_string (kf, "main", "vpn-ip-iface", NULL);