summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2020-01-09 08:46:47 +0000
committerRichard Hughes <richard@hughsie.com>2020-01-10 09:06:26 +0000
commit75aba6354b90d3b799d2ab7b7edca1c121505496 (patch)
tree78fb0b978a9e31c62c44e452237121ec58307fab
parent15ad60faebdd62f895d6d5a569e9cc82d8584fb9 (diff)
trivial: Fix self tests by not loading missing file
-rw-r--r--src/pk-self-test.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/pk-self-test.c b/src/pk-self-test.c
index 029855f67..5c2f8d9c3 100644
--- a/src/pk-self-test.c
+++ b/src/pk-self-test.c
@@ -310,10 +310,10 @@ pk_test_backend_spawn_func (void)
const gchar *text;
gboolean ret;
gchar *uri;
- GError *error = NULL;
g_autoptr(GKeyFile) conf = NULL;
g_autoptr(PkBackend) backend = NULL;
g_autoptr(PkBackendJob) job = NULL;
+ g_autoptr(GError) error = NULL;
/* get an backend_spawn */
conf = g_key_file_new ();
@@ -338,13 +338,9 @@ pk_test_backend_spawn_func (void)
text = pk_backend_spawn_get_name (backend_spawn);
g_assert_cmpstr (text, ==, "test_spawn");
- /* needed to avoid an error */
- ret = pk_backend_load (backend, &error);
- g_assert_no_error (error);
- g_assert (ret);
-
/* test pk_backend_spawn_inject_data Percentage1 */
- ret = pk_backend_spawn_inject_data (backend_spawn, job, "percentage\t0", NULL);
+ ret = pk_backend_spawn_inject_data (backend_spawn, job, "percentage\t0", &error);
+ g_assert_no_error (error);
g_assert (ret);
/* test pk_backend_spawn_inject_data Percentage2 */
@@ -441,10 +437,6 @@ pk_test_backend_spawn_func (void)
(PkBackendJobVFunc) pk_test_backend_spawn_package_cb,
backend_spawn);
- /* needed to avoid an error */
- ret = pk_backend_load (backend, NULL);
- g_assert (ret);
-
/* test search-name.sh running */
ret = pk_backend_spawn_helper (backend_spawn, job, "search-name.sh", "none", "bar", NULL);
g_assert (ret);