From c7413865118a21ad4ba362ecf02bbd4eb7ba67c6 Mon Sep 17 00:00:00 2001 From: Imran Zaman Date: Fri, 20 Dec 2013 15:07:04 +0200 Subject: [PATCH] fix test cases --- test/common/commontest.c | 2 +- test/daemon/daemon-test.c | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/test/common/commontest.c b/test/common/commontest.c index 508a683..7545830 100644 --- a/test/common/commontest.c +++ b/test/common/commontest.c @@ -154,7 +154,7 @@ START_TEST (test_config) GUM_CONFIG_GENERAL_DEF_USR_GROUPS) == NULL); fail_if (g_strcmp0 (gum_config_get_string (config, - GUM_CONFIG_GENERAL_DEF_USR_GROUPS), "users") != 0); + GUM_CONFIG_GENERAL_DEF_USR_GROUPS), "") != 0); g_unsetenv ("UM_CONF_FILE"); diff --git a/test/daemon/daemon-test.c b/test/daemon/daemon-test.c index 10b57b7..23200af 100644 --- a/test/daemon/daemon-test.c +++ b/test/daemon/daemon-test.c @@ -1299,16 +1299,13 @@ START_TEST (test_daemon_group) fail_unless (error->code == GUM_ERROR_GROUP_USER_ALREADY_A_MEMBER); g_error_free (error); error = NULL; - /* case 16: adding 'users' group should fail as it is added by default*/ + /* case 16: adding user to 'users' group should succeed */ g_object_unref (group); group = gumd_daemon_group_new (config); g_object_set (G_OBJECT (group), "grouptype", GUM_GROUPTYPE_USER, "groupname", "users", NULL); fail_unless (gumd_daemon_group_add_member (group, uid, TRUE, &error) - == FALSE); - fail_unless (error != NULL); - fail_unless (error->code == GUM_ERROR_GROUP_USER_ALREADY_A_MEMBER); - g_error_free (error); error = NULL; + == TRUE); /* case 17: delete user from group and user does not exist*/ g_object_unref (group); -- 2.7.4