summaryrefslogtreecommitdiff
path: root/src/tests/test-ip6-config.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/test-ip6-config.c')
-rw-r--r--src/tests/test-ip6-config.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/tests/test-ip6-config.c b/src/tests/test-ip6-config.c
index 5a2bb58905..3eceec0cbe 100644
--- a/src/tests/test-ip6-config.c
+++ b/src/tests/test-ip6-config.c
@@ -26,7 +26,7 @@
#include "nm-ip6-config.h"
#include "nm-platform.h"
-#include "nm-test-utils.h"
+#include "nm-test-utils-core.h"
static NMIP6Config *
build_test_config (void)
@@ -132,18 +132,18 @@ test_compare_with_source (void)
/* Address */
addr = *nmtst_platform_ip6_address ("1122:3344:5566::7788", NULL, 64);
- addr.source = NM_IP_CONFIG_SOURCE_USER;
+ addr.addr_source = NM_IP_CONFIG_SOURCE_USER;
nm_ip6_config_add_address (a, &addr);
- addr.source = NM_IP_CONFIG_SOURCE_VPN;
+ addr.addr_source = NM_IP_CONFIG_SOURCE_VPN;
nm_ip6_config_add_address (b, &addr);
/* Route */
route = *nmtst_platform_ip6_route ("abcd:1234:4321::", 24, "abcd:1234:4321:cdde::2");
- route.source = NM_IP_CONFIG_SOURCE_USER;
+ route.rt_source = NM_IP_CONFIG_SOURCE_USER;
nm_ip6_config_add_route (a, &route);
- route.source = NM_IP_CONFIG_SOURCE_VPN;
+ route.rt_source = NM_IP_CONFIG_SOURCE_VPN;
nm_ip6_config_add_route (b, &route);
/* Assert that the configs are basically the same, eg that the source is ignored */
@@ -164,31 +164,31 @@ test_add_address_with_source (void)
/* Test that a higher priority source is not overwritten */
addr = *nmtst_platform_ip6_address ("1122:3344:5566::7788", NULL, 64);
- addr.source = NM_IP_CONFIG_SOURCE_USER;
+ addr.addr_source = NM_IP_CONFIG_SOURCE_USER;
nm_ip6_config_add_address (a, &addr);
test_addr = nm_ip6_config_get_address (a, 0);
- g_assert_cmpint (test_addr->source, ==, NM_IP_CONFIG_SOURCE_USER);
+ g_assert_cmpint (test_addr->addr_source, ==, NM_IP_CONFIG_SOURCE_USER);
- addr.source = NM_IP_CONFIG_SOURCE_VPN;
+ addr.addr_source = NM_IP_CONFIG_SOURCE_VPN;
nm_ip6_config_add_address (a, &addr);
test_addr = nm_ip6_config_get_address (a, 0);
- g_assert_cmpint (test_addr->source, ==, NM_IP_CONFIG_SOURCE_USER);
+ g_assert_cmpint (test_addr->addr_source, ==, NM_IP_CONFIG_SOURCE_USER);
/* Test that a lower priority address source is overwritten */
nm_ip6_config_del_address (a, 0);
- addr.source = NM_IP_CONFIG_SOURCE_KERNEL;
+ addr.addr_source = NM_IP_CONFIG_SOURCE_KERNEL;
nm_ip6_config_add_address (a, &addr);
test_addr = nm_ip6_config_get_address (a, 0);
- g_assert_cmpint (test_addr->source, ==, NM_IP_CONFIG_SOURCE_KERNEL);
+ g_assert_cmpint (test_addr->addr_source, ==, NM_IP_CONFIG_SOURCE_KERNEL);
- addr.source = NM_IP_CONFIG_SOURCE_USER;
+ addr.addr_source = NM_IP_CONFIG_SOURCE_USER;
nm_ip6_config_add_address (a, &addr);
test_addr = nm_ip6_config_get_address (a, 0);
- g_assert_cmpint (test_addr->source, ==, NM_IP_CONFIG_SOURCE_USER);
+ g_assert_cmpint (test_addr->addr_source, ==, NM_IP_CONFIG_SOURCE_USER);
g_object_unref (a);
}
@@ -204,31 +204,31 @@ test_add_route_with_source (void)
/* Test that a higher priority source is not overwritten */
route = *nmtst_platform_ip6_route ("abcd:1234:4321::", 24, "abcd:1234:4321:cdde::2");
- route.source = NM_IP_CONFIG_SOURCE_USER;
+ route.rt_source = NM_IP_CONFIG_SOURCE_USER;
nm_ip6_config_add_route (a, &route);
test_route = nm_ip6_config_get_route (a, 0);
- g_assert_cmpint (test_route->source, ==, NM_IP_CONFIG_SOURCE_USER);
+ g_assert_cmpint (test_route->rt_source, ==, NM_IP_CONFIG_SOURCE_USER);
- route.source = NM_IP_CONFIG_SOURCE_VPN;
+ route.rt_source = NM_IP_CONFIG_SOURCE_VPN;
nm_ip6_config_add_route (a, &route);
test_route = nm_ip6_config_get_route (a, 0);
- g_assert_cmpint (test_route->source, ==, NM_IP_CONFIG_SOURCE_USER);
+ g_assert_cmpint (test_route->rt_source, ==, NM_IP_CONFIG_SOURCE_USER);
/* Test that a lower priority address source is overwritten */
nm_ip6_config_del_route (a, 0);
- route.source = NM_IP_CONFIG_SOURCE_KERNEL;
+ route.rt_source = NM_IP_CONFIG_SOURCE_KERNEL;
nm_ip6_config_add_route (a, &route);
test_route = nm_ip6_config_get_route (a, 0);
- g_assert_cmpint (test_route->source, ==, NM_IP_CONFIG_SOURCE_KERNEL);
+ g_assert_cmpint (test_route->rt_source, ==, NM_IP_CONFIG_SOURCE_KERNEL);
- route.source = NM_IP_CONFIG_SOURCE_USER;
+ route.rt_source = NM_IP_CONFIG_SOURCE_USER;
nm_ip6_config_add_route (a, &route);
test_route = nm_ip6_config_get_route (a, 0);
- g_assert_cmpint (test_route->source, ==, NM_IP_CONFIG_SOURCE_USER);
+ g_assert_cmpint (test_route->rt_source, ==, NM_IP_CONFIG_SOURCE_USER);
g_object_unref (a);
}