[folks] e-d-s: configure primary store for link-personas test via env var
- From: Raul Gutierrez Segales <raulgs src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] e-d-s: configure primary store for link-personas test via env var
- Date: Fri, 16 Sep 2011 13:47:53 +0000 (UTC)
commit 2c380b4823ae672f614fbdf53da671b536f362d3
Author: Raul Gutierrez Segales <rgs collabora co uk>
Date: Fri Sep 16 14:30:12 2011 +0100
e-d-s: configure primary store for link-personas test via env var
For tests, it's much simpler to do it via an env variable than via
GConf and we avoid ourselves a dependency.
Helps: https://bugzilla.gnome.org/show_bug.cgi?id=647909
tests/eds/Makefile.am | 3 ---
tests/eds/link-personas.vala | 32 +++++---------------------------
2 files changed, 5 insertions(+), 30 deletions(-)
---
diff --git a/tests/eds/Makefile.am b/tests/eds/Makefile.am
index 68233d6..e114dc4 100644
--- a/tests/eds/Makefile.am
+++ b/tests/eds/Makefile.am
@@ -3,7 +3,6 @@ AM_CPPFLAGS = \
$(GEE_CFLAGS) \
$(EBOOK_CFLAGS) \
$(EDATASERVER_CFLAGS) \
- $(GCONF2_CFLAGS) \
-I$(top_srcdir)/folks \
-I$(top_srcdir)/backends/eds/lib \
-I$(top_srcdir)/backends/eds/lib/folks \
@@ -19,7 +18,6 @@ LDADD = \
$(top_builddir)/folks/libfolks.la \
$(GLIB_LIBS) \
$(GEE_LIBS) \
- $(GCONF2_LIBS) \
-L$(top_srcdir)/backends/eds/lib \
$(NULL)
@@ -40,7 +38,6 @@ AM_VALAFLAGS = \
--pkg libxml-2.0 \
--pkg folks-eds \
--pkg eds-test \
- --pkg gconf-2.0 \
-g \
$(NULL)
diff --git a/tests/eds/link-personas.vala b/tests/eds/link-personas.vala
index d667b8f..e7580de 100644
--- a/tests/eds/link-personas.vala
+++ b/tests/eds/link-personas.vala
@@ -49,8 +49,6 @@ public class LinkPersonasTests : Folks.TestCase
private string _persona_iid_2;
private HashSet<Persona> _personas;
private int _removed_individuals;
- private string _folks_config_key = "/system/folks/backends/primary_store";
- private unowned GConf.Client? _gconf_client;
private Gee.HashMap<string, string> _linking_props;
private LinkingMethod _linking_method;
@@ -76,18 +74,9 @@ public class LinkPersonasTests : Folks.TestCase
this._eds_backend_other = new EdsTest.Backend ();
this._eds_backend_other.address_book_uri = "local://other";
- /* We configure eds as the primary (writeable) store */
- this._gconf_client = GConf.Client.get_default ();
- try
- {
- GConf.Value val = new GConf.Value (GConf.ValueType.STRING);
- val.set_string ("eds:%s".printf (this._eds_backend.address_book_uri));
- this._gconf_client.set (this._folks_config_key, val);
- }
- catch (GLib.Error e)
- {
- warning ("Couldn't set primary store: %s\n", e.message);
- }
+ /* We configure eds as the primary store */
+ var config_val = "eds:%s".printf (this._eds_backend.address_book_uri);
+ Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
this._eds_backend.set_up ();
this._eds_backend_other.set_up ();
@@ -98,21 +87,10 @@ public class LinkPersonasTests : Folks.TestCase
this._eds_backend.tear_down ();
this._eds_backend_other.tear_down ();
+ Environment.unset_variable ("FOLKS_PRIMARY_STORE");
+
this._eds_backend = null;
this._eds_backend_other = null;
-
- try
- {
- this._gconf_client.unset (this._folks_config_key);
- }
- catch (GLib.Error e)
- {
- warning ("Couldn't unset primary store: %s\n", e.message);
- }
- finally
- {
- this._gconf_client = null;
- }
}
public void test_linking_personas_via_im_addresses ()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]