Commit 6261f421 authored by Richard Hughes's avatar Richard Hughes

trivial: Do not use the global cache directly in the self tests

parent 46cd0fab
......@@ -3778,19 +3778,4 @@ gs_plugin_loader_set_max_parallel_ops (GsPluginLoader *plugin_loader,
error->message);
}
/*
* gs_plugin_loader_get_global_cache:
* @plugin_loader: a #GsPluginLoader
*
* Returns the global cache.
*
* Returns: (transfer none): a #GsAppList
**/
GsAppList *
gs_plugin_loader_get_global_cache (GsPluginLoader *plugin_loader)
{
GsPluginLoaderPrivate *priv = gs_plugin_loader_get_instance_private (plugin_loader);
return priv->global_cache;
}
/* vim: set noexpandtab: */
......@@ -112,7 +112,6 @@ GsPlugin *gs_plugin_loader_find_plugin (GsPluginLoader *plugin_loader,
const gchar *plugin_name);
void gs_plugin_loader_set_max_parallel_ops (GsPluginLoader *plugin_loader,
guint num_ops);
GsAppList *gs_plugin_loader_get_global_cache (GsPluginLoader *plugin_loader);
G_END_DECLS
......
......@@ -1490,7 +1490,6 @@ gs_plugins_flatpak_runtime_extension_func (GsPluginLoader *plugin_loader)
{
GsApp *app;
GsApp *runtime;
GsApp *extension;
GsApp *app_tmp;
gboolean got_progress_installing = FALSE;
gboolean ret;
......@@ -1505,11 +1504,11 @@ gs_plugins_flatpak_runtime_extension_func (GsPluginLoader *plugin_loader)
g_autofree gchar *repodir2_fn = NULL;
g_autoptr(GError) error = NULL;
g_autoptr(GsApp) app_source = NULL;
g_autoptr(GsApp) extension = NULL;
g_autoptr(GsAppList) list = NULL;
g_autoptr(GsAppList) list_updates = NULL;
g_autoptr(GsPluginJob) plugin_job = NULL;
g_autoptr(GMainLoop) loop = g_main_loop_new (NULL, FALSE);
GsAppList *global_cache = NULL;
/* drop all caches */
gs_plugin_loader_setup_again (plugin_loader);
......@@ -1590,8 +1589,8 @@ gs_plugins_flatpak_runtime_extension_func (GsPluginLoader *plugin_loader)
g_assert_cmpstr (gs_app_get_version (app), ==, "1.2.3");
/* check if the extension was installed */
global_cache = gs_plugin_loader_get_global_cache (plugin_loader);
extension = gs_app_list_lookup (global_cache, "user/flatpak/*/runtime/org.test.Chiron.Extension/master");
extension = gs_plugin_loader_app_create (plugin_loader,
"user/flatpak/*/runtime/org.test.Chiron.Extension/master");
g_assert_nonnull (extension);
g_assert_cmpint (gs_app_get_state (extension), ==, AS_APP_STATE_INSTALLED);
......
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