Commit 0ff740a9 authored by Raul Gutierrez Segales's avatar Raul Gutierrez Segales
Browse files

eds: rework tests so that they don't depend on relative URIs

Previously, tests were build around the assumption that each
Edsf.PersonaStore had an id == ESource.relative_uri. That
stopped being true (because you'll get swallowed by a black
hole in pwithnall's garden if you use relative URIs).

Helps: https://bugzilla.gnome.org/show_bug.cgi?id=659732
parent 73647bc6
......@@ -101,7 +101,8 @@ public class AddContactsStressTestTests : Folks.TestCase
foreach (var backend in store.enabled_backends.values)
{
this._pstore =
(Edsf.PersonaStore) backend.persona_stores.get ("local://test");
(Edsf.PersonaStore) backend.persona_stores.get (
this._eds_backend.address_book_uid);
if (this._pstore != null)
break;
}
......
......@@ -134,7 +134,8 @@ public class AddPersonaTests : Folks.TestCase
foreach (var backend in store.enabled_backends.values)
{
this._pstore =
(Edsf.PersonaStore) backend.persona_stores.get ("local://test");
(Edsf.PersonaStore) backend.persona_stores.get (
this._eds_backend.address_book_uid);
if (this._pstore != null)
break;
}
......
......@@ -88,8 +88,10 @@ public class ChangePrimaryStoreTests : Folks.TestCase
{
yield this._aggregator.prepare ();
this._pstore1 = this._get_persona_store (store, "system");
this._pstore2 = this._get_persona_store (store, "other");
this._pstore1 = this._get_persona_store (store,
this._eds_backend.address_book_uid);
this._pstore2 = this._get_persona_store (store,
this._eds_backend_other.address_book_uid);
assert (this._pstore1 != null);
assert (this._pstore2 != null);
......
......@@ -91,7 +91,9 @@ public class RemovePersonaTests : Folks.TestCase
this._pstore = null;
foreach (var backend in store.enabled_backends.values)
{
this._pstore = backend.persona_stores.get ("local://test");
this._pstore =
(Edsf.PersonaStore) backend.persona_stores.get (
this._eds_backend.address_book_uid);
if (this._pstore != null)
break;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment