[folks] Properly set primary stores for tests to exactly what's used.



commit f48cf529d06ced6bcb2b597ce1ff57602f886d38
Author: Travis Reitter <travis reitter collabora co uk>
Date:   Fri Oct 28 08:08:54 2011 -0700

    Properly set primary stores for tests to exactly what's used.
    
    Helps: bgo#662274 - Failed to link personas: Can't link personas with
    no primary store.

 tests/eds/add-contacts-stress-test.vala |    7 +++++--
 tests/eds/add-persona.vala              |    7 +++++--
 tests/eds/avatar-details.vala           |    7 +++++--
 tests/eds/email-details.vala            |    7 +++++--
 tests/eds/im-details.vala               |    7 +++++--
 tests/eds/individual-retrieval.vala     |    7 +++++--
 tests/eds/name-details.vala             |    7 +++++--
 tests/eds/phone-details.vala            |    7 +++++--
 tests/eds/postal-address-details.vala   |    7 +++++--
 tests/eds/remove-persona.vala           |    7 +++++--
 tests/eds/removing-contacts.vala        |    7 +++++--
 tests/eds/set-avatar.vala               |    7 +++++--
 tests/eds/set-birthday.vala             |    7 +++++--
 tests/eds/set-emails.vala               |    7 +++++--
 tests/eds/set-gender.vala               |    7 +++++--
 tests/eds/set-im-addresses.vala         |    7 +++++--
 tests/eds/set-is-favourite.vala         |    7 +++++--
 tests/eds/set-names.vala                |    7 +++++--
 tests/eds/set-notes.vala                |    7 +++++--
 tests/eds/set-phones.vala               |    7 +++++--
 tests/eds/set-postal-addresses.vala     |    7 +++++--
 tests/eds/set-properties-race.vala      |    7 +++++--
 tests/eds/set-roles.vala                |    7 +++++--
 tests/eds/set-structured-name.vala      |    7 +++++--
 tests/eds/set-urls.vala                 |    7 +++++--
 tests/eds/store-removed.vala            |    7 +++++--
 tests/eds/updating-contacts.vala        |    7 +++++--
 tests/key-file/Makefile.am              |    1 +
 tests/libsocialweb/Makefile.am          |    2 +-
 tests/libsocialweb/aggregation.vala     |    3 +++
 tests/telepathy/Makefile.am             |    2 +-
 31 files changed, 141 insertions(+), 56 deletions(-)
---
diff --git a/tests/eds/add-contacts-stress-test.vala b/tests/eds/add-contacts-stress-test.vala
index 264860f..d41d14a 100644
--- a/tests/eds/add-contacts-stress-test.vala
+++ b/tests/eds/add-contacts-stress-test.vala
@@ -36,8 +36,6 @@ public class AddContactsStressTestTests : Folks.TestCase
     {
       base ("AddContactsStressTestTests");
 
-      this._eds_backend = new EdsTest.Backend ();
-
       var test_desc = "stress testing adding (%d) contacts to e-d-s ".printf (
           this._contacts_cnt);
       this.add_test (test_desc, this.test_add_contacts);
@@ -45,7 +43,12 @@ public class AddContactsStressTestTests : Folks.TestCase
 
   public override void set_up ()
     {
+      this._eds_backend = new EdsTest.Backend ();
       this._eds_backend.set_up ();
+
+      /* We configure eds as the primary store */
+      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
+      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
     }
 
   public override void tear_down ()
diff --git a/tests/eds/add-persona.vala b/tests/eds/add-persona.vala
index 0aa3c17..b2ad672 100644
--- a/tests/eds/add-persona.vala
+++ b/tests/eds/add-persona.vala
@@ -55,14 +55,17 @@ public class AddPersonaTests : Folks.TestCase
     {
       base ("AddPersonaTests");
 
-      this._eds_backend = new EdsTest.Backend ();
-
       this.add_test ("test adding a persona to e-d-s ", this.test_add_persona);
     }
 
   public override void set_up ()
     {
+      this._eds_backend = new EdsTest.Backend ();
       this._eds_backend.set_up ();
+
+      /* We configure eds as the primary store */
+      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
+      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
     }
 
   public override void tear_down ()
diff --git a/tests/eds/avatar-details.vala b/tests/eds/avatar-details.vala
index b3585ef..979f2c9 100644
--- a/tests/eds/avatar-details.vala
+++ b/tests/eds/avatar-details.vala
@@ -35,14 +35,17 @@ public class AvatarDetailsTests : Folks.TestCase
     {
       base ("AvatarDetails");
 
-      this._eds_backend = new EdsTest.Backend ();
-
       this.add_test ("avatar details interface", this.test_avatar);
     }
 
   public override void set_up ()
     {
+      this._eds_backend = new EdsTest.Backend ();
       this._eds_backend.set_up ();
+
+      /* We configure eds as the primary store */
+      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
+      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
     }
 
   public override void tear_down ()
diff --git a/tests/eds/email-details.vala b/tests/eds/email-details.vala
index 033e94d..10dd688 100644
--- a/tests/eds/email-details.vala
+++ b/tests/eds/email-details.vala
@@ -37,14 +37,17 @@ public class EmailDetailsTests : Folks.TestCase
     {
       base ("EmailDetails");
 
-      this._eds_backend = new EdsTest.Backend ();
-
       this.add_test ("email details interface", this.test_email_details);
     }
 
   public override void set_up ()
     {
+      this._eds_backend = new EdsTest.Backend ();
       this._eds_backend.set_up ();
+
+      /* We configure eds as the primary store */
+      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
+      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
     }
 
   public override void tear_down ()
diff --git a/tests/eds/im-details.vala b/tests/eds/im-details.vala
index f78b87b..d16c72f 100644
--- a/tests/eds/im-details.vala
+++ b/tests/eds/im-details.vala
@@ -36,15 +36,18 @@ public class ImDetailsTests : Folks.TestCase
     {
       base ("ImDetailsTests");
 
-      this._eds_backend = new EdsTest.Backend ();
-
       this.add_test ("test im details interface",
           this.test_im_details_interface);
     }
 
   public override void set_up ()
     {
+      this._eds_backend = new EdsTest.Backend ();
       this._eds_backend.set_up ();
+
+      /* We configure eds as the primary store */
+      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
+      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
     }
 
   public override void tear_down ()
diff --git a/tests/eds/individual-retrieval.vala b/tests/eds/individual-retrieval.vala
index 5f0262f..b3d8e4e 100644
--- a/tests/eds/individual-retrieval.vala
+++ b/tests/eds/individual-retrieval.vala
@@ -33,14 +33,17 @@ public class IndividualRetrievalTests : Folks.TestCase
     {
       base ("IndividualRetrieval");
 
-      this._eds_backend = new EdsTest.Backend ();
-
       this.add_test ("singleton individuals", this.test_singleton_individuals);
     }
 
   public override void set_up ()
     {
+      this._eds_backend = new EdsTest.Backend ();
       this._eds_backend.set_up ();
+
+      /* We configure eds as the primary store */
+      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
+      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
     }
 
   public override void tear_down ()
diff --git a/tests/eds/name-details.vala b/tests/eds/name-details.vala
index 313457e..9c481d7 100644
--- a/tests/eds/name-details.vala
+++ b/tests/eds/name-details.vala
@@ -35,14 +35,17 @@ public class NameDetailsTests : Folks.TestCase
     {
       base ("NameDetails");
 
-      this._eds_backend = new EdsTest.Backend ();
-
       this.add_test ("name details interface", this.test_names);
     }
 
   public override void set_up ()
     {
+      this._eds_backend = new EdsTest.Backend ();
       this._eds_backend.set_up ();
+
+      /* We configure eds as the primary store */
+      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
+      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
     }
 
   public override void tear_down ()
diff --git a/tests/eds/phone-details.vala b/tests/eds/phone-details.vala
index f80a6a5..047ed00 100644
--- a/tests/eds/phone-details.vala
+++ b/tests/eds/phone-details.vala
@@ -36,14 +36,17 @@ public class PhoneDetailsTests : Folks.TestCase
     {
       base ("PhoneDetails");
 
-      this._eds_backend = new EdsTest.Backend ();
-
       this.add_test ("phone details interface", this.test_phone_numbers);
     }
 
   public override void set_up ()
     {
+      this._eds_backend = new EdsTest.Backend ();
       this._eds_backend.set_up ();
+
+      /* We configure eds as the primary store */
+      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
+      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
     }
 
   public override void tear_down ()
diff --git a/tests/eds/postal-address-details.vala b/tests/eds/postal-address-details.vala
index 216b950..bffe3f1 100644
--- a/tests/eds/postal-address-details.vala
+++ b/tests/eds/postal-address-details.vala
@@ -41,15 +41,18 @@ public class PostalAddressDetailsTests : Folks.TestCase
     {
       base ("PostalAddressDetailsTests");
 
-      this._eds_backend = new EdsTest.Backend ();
-
       this.add_test ("test postal address details interface",
           this.test_postal_address_details_interface);
     }
 
   public override void set_up ()
     {
+      this._eds_backend = new EdsTest.Backend ();
       this._eds_backend.set_up ();
+
+      /* We configure eds as the primary store */
+      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
+      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
     }
 
   public override void tear_down ()
diff --git a/tests/eds/remove-persona.vala b/tests/eds/remove-persona.vala
index 9883e6b..eb23447 100644
--- a/tests/eds/remove-persona.vala
+++ b/tests/eds/remove-persona.vala
@@ -39,15 +39,18 @@ public class RemovePersonaTests : Folks.TestCase
     {
       base ("RemovePersonaTests");
 
-      this._eds_backend = new EdsTest.Backend ();
-
       this.add_test ("test removing personas from e-d-s ",
           this.test_remove_persona);
     }
 
   public override void set_up ()
     {
+      this._eds_backend = new EdsTest.Backend ();
       this._eds_backend.set_up ();
+
+      /* We configure eds as the primary store */
+      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
+      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
     }
 
   public override void tear_down ()
diff --git a/tests/eds/removing-contacts.vala b/tests/eds/removing-contacts.vala
index 09c2c29..63dfcd3 100644
--- a/tests/eds/removing-contacts.vala
+++ b/tests/eds/removing-contacts.vala
@@ -34,14 +34,17 @@ public class RemovingContactsTests : Folks.TestCase
     {
       base ("IndividualRetrieval");
 
-      this._eds_backend = new EdsTest.Backend ();
-
       this.add_test ("removing contact", this.test_removal);
     }
 
   public override void set_up ()
     {
+      this._eds_backend = new EdsTest.Backend ();
       this._eds_backend.set_up ();
+
+      /* We configure eds as the primary store */
+      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
+      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
    }
 
   public override void tear_down ()
diff --git a/tests/eds/set-avatar.vala b/tests/eds/set-avatar.vala
index 48876dd..fb36ce6 100644
--- a/tests/eds/set-avatar.vala
+++ b/tests/eds/set-avatar.vala
@@ -35,8 +35,6 @@ public class SetAvatarTests : Folks.TestCase
     {
       base ("SetAvatar");
 
-      this._eds_backend = new EdsTest.Backend ();
-
       this.add_test ("setting avatar on e-d-s persona", this.test_set_avatar);
       this.add_test ("setting avatar on e-d-s individual",
           this.test_set_individual_avatar);
@@ -44,7 +42,12 @@ public class SetAvatarTests : Folks.TestCase
 
   public override void set_up ()
     {
+      this._eds_backend = new EdsTest.Backend ();
       this._eds_backend.set_up ();
+
+      /* We configure eds as the primary store */
+      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
+      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
     }
 
   public override void tear_down ()
diff --git a/tests/eds/set-birthday.vala b/tests/eds/set-birthday.vala
index 1ef4d89..26c7f10 100644
--- a/tests/eds/set-birthday.vala
+++ b/tests/eds/set-birthday.vala
@@ -34,15 +34,18 @@ public class SetBirthdayTests : Folks.TestCase
     {
       base ("SetBirthday");
 
-      this._eds_backend = new EdsTest.Backend ();
-
       this.add_test ("setting birthday on an e-d-s persona",
           this.test_set_birthday);
     }
 
   public override void set_up ()
     {
+      this._eds_backend = new EdsTest.Backend ();
       this._eds_backend.set_up ();
+
+      /* We configure eds as the primary store */
+      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
+      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
     }
 
   public override void tear_down ()
diff --git a/tests/eds/set-emails.vala b/tests/eds/set-emails.vala
index 0bd9e54..a22dd65 100644
--- a/tests/eds/set-emails.vala
+++ b/tests/eds/set-emails.vala
@@ -34,14 +34,17 @@ public class SetEmailsTests : Folks.TestCase
     {
       base ("SetEmails");
 
-      this._eds_backend = new EdsTest.Backend ();
-
       this.add_test ("setting emails on e-d-s persona", this.test_set_emails);
     }
 
   public override void set_up ()
     {
+      this._eds_backend = new EdsTest.Backend ();
       this._eds_backend.set_up ();
+
+      /* We configure eds as the primary store */
+      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
+      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
     }
 
   public override void tear_down ()
diff --git a/tests/eds/set-gender.vala b/tests/eds/set-gender.vala
index 09cccca..0ef00c7 100644
--- a/tests/eds/set-gender.vala
+++ b/tests/eds/set-gender.vala
@@ -34,15 +34,18 @@ public class SetGenderTests : Folks.TestCase
     {
       base ("SetGender");
 
-      this._eds_backend = new EdsTest.Backend ();
-
       this.add_test ("setting gender on e-d-s persona",
           this.test_set_gender);
     }
 
   public override void set_up ()
     {
+      this._eds_backend = new EdsTest.Backend ();
       this._eds_backend.set_up ();
+
+      /* We configure eds as the primary store */
+      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
+      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
     }
 
   public override void tear_down ()
diff --git a/tests/eds/set-im-addresses.vala b/tests/eds/set-im-addresses.vala
index 41776a8..cfa9379 100644
--- a/tests/eds/set-im-addresses.vala
+++ b/tests/eds/set-im-addresses.vala
@@ -34,15 +34,18 @@ public class SetIMAddressesTests : Folks.TestCase
     {
       base ("SetIMAddresses");
 
-      this._eds_backend = new EdsTest.Backend ();
-
       this.add_test ("setting im addresses on e-d-s persona",
           this.test_set_im_addresses);
     }
 
   public override void set_up ()
     {
+      this._eds_backend = new EdsTest.Backend ();
       this._eds_backend.set_up ();
+
+      /* We configure eds as the primary store */
+      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
+      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
     }
 
   public override void tear_down ()
diff --git a/tests/eds/set-is-favourite.vala b/tests/eds/set-is-favourite.vala
index 99af8c3..05e4e6b 100644
--- a/tests/eds/set-is-favourite.vala
+++ b/tests/eds/set-is-favourite.vala
@@ -34,15 +34,18 @@ public class SetIsFavouriteTests : Folks.TestCase
     {
       base ("SetIsFavourite");
 
-      this._eds_backend = new EdsTest.Backend ();
-
       this.add_test ("setting is favourite on e-d-s persona",
           this.test_set_favourite);
     }
 
   public override void set_up ()
     {
+      this._eds_backend = new EdsTest.Backend ();
       this._eds_backend.set_up ();
+
+      /* We configure eds as the primary store */
+      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
+      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
     }
 
   public override void tear_down ()
diff --git a/tests/eds/set-names.vala b/tests/eds/set-names.vala
index bde0e59..d7b93af 100644
--- a/tests/eds/set-names.vala
+++ b/tests/eds/set-names.vala
@@ -36,15 +36,18 @@ public class SetNamesTests : Folks.TestCase
     {
       base ("SetNames");
 
-      this._eds_backend = new EdsTest.Backend ();
-
       this.add_test ("setting full name on e-d-s persona",
           this.test_set_names);
     }
 
   public override void set_up ()
     {
+      this._eds_backend = new EdsTest.Backend ();
       this._eds_backend.set_up ();
+
+      /* We configure eds as the primary store */
+      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
+      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
     }
 
   public override void tear_down ()
diff --git a/tests/eds/set-notes.vala b/tests/eds/set-notes.vala
index b146af7..67c9b0f 100644
--- a/tests/eds/set-notes.vala
+++ b/tests/eds/set-notes.vala
@@ -35,15 +35,18 @@ public class SetNotesTests : Folks.TestCase
     {
       base ("SetNotes");
 
-      this._eds_backend = new EdsTest.Backend ();
-
       this.add_test ("setting notes name on e-d-s persona",
           this.test_set_notes);
     }
 
   public override void set_up ()
     {
+      this._eds_backend = new EdsTest.Backend ();
       this._eds_backend.set_up ();
+
+      /* We configure eds as the primary store */
+      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
+      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
     }
 
   public override void tear_down ()
diff --git a/tests/eds/set-phones.vala b/tests/eds/set-phones.vala
index 0452ab1..1635cae 100644
--- a/tests/eds/set-phones.vala
+++ b/tests/eds/set-phones.vala
@@ -34,14 +34,17 @@ public class SetPhonesTests : Folks.TestCase
     {
       base ("SetPhones");
 
-      this._eds_backend = new EdsTest.Backend ();
-
       this.add_test ("setting phones on e-d-s persona", this.test_set_phones);
     }
 
   public override void set_up ()
     {
+      this._eds_backend = new EdsTest.Backend ();
       this._eds_backend.set_up ();
+
+      /* We configure eds as the primary store */
+      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
+      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
     }
 
   public override void tear_down ()
diff --git a/tests/eds/set-postal-addresses.vala b/tests/eds/set-postal-addresses.vala
index ef65ca9..c00f76a 100644
--- a/tests/eds/set-postal-addresses.vala
+++ b/tests/eds/set-postal-addresses.vala
@@ -35,15 +35,18 @@ public class SetPostalAddressesTests : Folks.TestCase
     {
       base ("SetPostalAddresses");
 
-      this._eds_backend = new EdsTest.Backend ();
-
       this.add_test ("setting postal addresss on e-d-s persona",
           this.test_set_postal_addresses);
     }
 
   public override void set_up ()
     {
+      this._eds_backend = new EdsTest.Backend ();
       this._eds_backend.set_up ();
+
+      /* We configure eds as the primary store */
+      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
+      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
     }
 
   public override void tear_down ()
diff --git a/tests/eds/set-properties-race.vala b/tests/eds/set-properties-race.vala
index 8179e5d..0d76f83 100644
--- a/tests/eds/set-properties-race.vala
+++ b/tests/eds/set-properties-race.vala
@@ -35,15 +35,18 @@ public class SetPropertiesRaceTests : Folks.TestCase
     {
       base ("SetPropertiesRace");
 
-      this._eds_backend = new EdsTest.Backend ();
-
       this.add_test ("setting postal addresss on e-d-s persona",
           this.test_set_postal_addresses);
     }
 
   public override void set_up ()
     {
+      this._eds_backend = new EdsTest.Backend ();
       this._eds_backend.set_up ();
+
+      /* We configure eds as the primary store */
+      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
+      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
     }
 
   public override void tear_down ()
diff --git a/tests/eds/set-roles.vala b/tests/eds/set-roles.vala
index bbe741c..db234eb 100644
--- a/tests/eds/set-roles.vala
+++ b/tests/eds/set-roles.vala
@@ -35,15 +35,18 @@ public class SetRolesTests : Folks.TestCase
     {
       base ("SetRoles");
 
-      this._eds_backend = new EdsTest.Backend ();
-
       this.add_test ("setting roles on e-d-s persona",
           this.test_set_roles);
     }
 
   public override void set_up ()
     {
+      this._eds_backend = new EdsTest.Backend ();
       this._eds_backend.set_up ();
+
+      /* We configure eds as the primary store */
+      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
+      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
     }
 
   public override void tear_down ()
diff --git a/tests/eds/set-structured-name.vala b/tests/eds/set-structured-name.vala
index 5b023bf..44be975 100644
--- a/tests/eds/set-structured-name.vala
+++ b/tests/eds/set-structured-name.vala
@@ -35,15 +35,18 @@ public class SetStructuredNameTests : Folks.TestCase
     {
       base ("SetStructuredName");
 
-      this._eds_backend = new EdsTest.Backend ();
-
       this.add_test ("setting structured name on e-d-s persona",
           this.test_set_structured_name);
     }
 
   public override void set_up ()
     {
+      this._eds_backend = new EdsTest.Backend ();
       this._eds_backend.set_up ();
+
+      /* We configure eds as the primary store */
+      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
+      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
     }
 
   public override void tear_down ()
diff --git a/tests/eds/set-urls.vala b/tests/eds/set-urls.vala
index ae100ab..0f8e233 100644
--- a/tests/eds/set-urls.vala
+++ b/tests/eds/set-urls.vala
@@ -42,15 +42,18 @@ public class SetUrlsTests : Folks.TestCase
     {
       base ("SetUrls");
 
-      this._eds_backend = new EdsTest.Backend ();
-
       this.add_test ("setting urls on e-d-s persona",
           this.test_set_urls);
     }
 
   public override void set_up ()
     {
+      this._eds_backend = new EdsTest.Backend ();
       this._eds_backend.set_up ();
+
+      /* We configure eds as the primary store */
+      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
+      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
     }
 
   public override void tear_down ()
diff --git a/tests/eds/store-removed.vala b/tests/eds/store-removed.vala
index e154c04..db3911a 100644
--- a/tests/eds/store-removed.vala
+++ b/tests/eds/store-removed.vala
@@ -32,14 +32,17 @@ public class StoreRemovedTests : Folks.TestCase
     {
       base ("StoreRemoved");
 
-      this._eds_backend = new EdsTest.Backend ();
-
       this.add_test ("single store", this.test_single_store);
     }
 
   public override void set_up ()
     {
+      this._eds_backend = new EdsTest.Backend ();
       this._eds_backend.set_up ();
+
+      /* We configure eds as the primary store */
+      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
+      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
     }
 
   public override void tear_down ()
diff --git a/tests/eds/updating-contacts.vala b/tests/eds/updating-contacts.vala
index 7b702e3..4943860 100644
--- a/tests/eds/updating-contacts.vala
+++ b/tests/eds/updating-contacts.vala
@@ -34,14 +34,17 @@ public class UpdatingContactsTests : Folks.TestCase
     {
       base ("UpdatingContacts");
 
-      this._eds_backend = new EdsTest.Backend ();
-
       this.add_test ("updating contact", this.test_updates);
     }
 
   public override void set_up ()
     {
+      this._eds_backend = new EdsTest.Backend ();
       this._eds_backend.set_up ();
+
+      /* We configure eds as the primary store */
+      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
+      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
     }
 
   public override void tear_down ()
diff --git a/tests/key-file/Makefile.am b/tests/key-file/Makefile.am
index 9aae008..45c7b73 100644
--- a/tests/key-file/Makefile.am
+++ b/tests/key-file/Makefile.am
@@ -39,6 +39,7 @@ backend_store_key_file=$(srcdir)/data/backend-store-key-file-only.ini
 TESTS_ENVIRONMENT = \
 	FOLKS_BACKEND_PATH=$(BACKEND_UNINST_PATH) \
         FOLKS_BACKEND_STORE_KEY_FILE_PATH=$(backend_store_key_file) \
+        FOLKS_PRIMARY_STORE=key-file \
         $(NULL)
 
 TESTS = $(noinst_PROGRAMS)
diff --git a/tests/libsocialweb/Makefile.am b/tests/libsocialweb/Makefile.am
index 34fd00a..fa17017 100644
--- a/tests/libsocialweb/Makefile.am
+++ b/tests/libsocialweb/Makefile.am
@@ -55,7 +55,7 @@ TESTS_ENVIRONMENT = \
 	GCONF_DEFAULT_SOURCE_PATH= abs_top_srcdir@/tests/data/gconf.path \
 	FOLKS_BACKEND_PATH=$(BACKEND_UNINST_PATH) \
 	FOLKS_BACKEND_STORE_KEY_FILE_PATH=$(backend_store_key_file) \
-	FOLKS_PRIMARY_STORE=key-file \
+	FOLKS_PRIMARY_STORE= \
 	$(RUN_WITH_PRIVATE_BUS) \
 	--config-file=$(SESSION_CONF) \
 	--
diff --git a/tests/libsocialweb/aggregation.vala b/tests/libsocialweb/aggregation.vala
index ff1db31..74e56a8 100644
--- a/tests/libsocialweb/aggregation.vala
+++ b/tests/libsocialweb/aggregation.vala
@@ -42,6 +42,9 @@ public class AggregationTests : Folks.TestCase
 
   public override void set_up ()
     {
+      /* Ensure we have a primary store for linking */
+      Environment.set_variable ("FOLKS_PRIMARY_STORE", "key-file", true);
+
       /* Initialize an empty key file for the relationships*/
       var kf_relationships_path = Path.build_filename (
           Environment.get_tmp_dir (),
diff --git a/tests/telepathy/Makefile.am b/tests/telepathy/Makefile.am
index 70ce53c..3e6eef8 100644
--- a/tests/telepathy/Makefile.am
+++ b/tests/telepathy/Makefile.am
@@ -57,7 +57,7 @@ TESTS_ENVIRONMENT = \
 	FOLKS_BACKEND_PATH=$(BACKEND_UNINST_PATH) \
 	FOLKS_BACKEND_KEY_FILE_PATH=$(srcdir)/data/relationships-empty.ini \
 	FOLKS_BACKEND_STORE_KEY_FILE_PATH=$(backend_store_key_file) \
-	FOLKS_PRIMARY_STORE=key-file \
+	FOLKS_PRIMARY_STORE= \
 	$(RUN_WITH_PRIVATE_BUS) \
 	--config-file=$(SESSION_CONF) \
 	--



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]