[glib/wip/ebassi/ci: 3/5] Allow running gdbus-peer inside a container
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/ebassi/ci: 3/5] Allow running gdbus-peer inside a container
- Date: Mon, 19 Feb 2018 14:51:19 +0000 (UTC)
commit c99434cd355bb49278f01fac65eb2d85a8fb4306
Author: Emmanuele Bassi <ebassi gnome org>
Date: Mon Feb 19 14:36:42 2018 +0000
Allow running gdbus-peer inside a container
The /etc/machine-id inside a Docker container is allowed to be empty, so
we need to check for that case.
gio/tests/gdbus-peer.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gio/tests/gdbus-peer.c b/gio/tests/gdbus-peer.c
index be2d057b2..101c2a8bb 100644
--- a/gio/tests/gdbus-peer.c
+++ b/gio/tests/gdbus-peer.c
@@ -1683,7 +1683,10 @@ codegen_test_peer (void)
g_assert_no_error (error);
g_variant_get (value, "(&s)", &s);
g_test_message ("Machine ID: %s", s);
- g_assert (g_dbus_is_guid (s));
+ /* It's valid for machine-id inside containers to be empty, so we
+ * need to test for that possibility
+ */
+ g_assert ((s == NULL || *s == '\0') || g_dbus_is_guid (s));
g_variant_unref (value);
/* Poke server and make sure animal is updated */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]