diff options
author | Christophe Fergeau <cfergeau@redhat.com> | 2012-11-21 17:45:15 +0100 |
---|---|---|
committer | Christophe Fergeau <cfergeau@redhat.com> | 2012-12-13 17:18:47 +0100 |
commit | b3536b8b983ae7cb879e63121dc0d9a97ba07ac6 (patch) | |
tree | 78e003aaae164371ece3ccfb441d393cb2a50800 /test | |
parent | fbd550b0827217817f05dc9fc4295ef8ea5bf3d4 (diff) |
Add osinfo_db_identify_media
Diffstat (limited to 'test')
-rw-r--r-- | test/test-isodetect.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/test-isodetect.c b/test/test-isodetect.c index 9033b32..f627300 100644 --- a/test/test-isodetect.c +++ b/test/test-isodetect.c @@ -252,18 +252,18 @@ static void test_one(const gchar *vendor) tmp = isos; while (tmp) { struct ISOInfo *info = tmp->data; - OsinfoMedia *media = NULL; - OsinfoOs *os = osinfo_db_guess_os_from_media(db, - info->media, - &media); + gboolean matched = osinfo_db_identify_media(db, info->media); + OsinfoOs *os; - fail_unless(os != NULL, "ISO %s was not matched by OS %s", + fail_unless(matched, "ISO %s was not matched by OS %s", info->filename, info->shortid); + g_object_get(info->media, "os", &os, NULL); const gchar *shortid = osinfo_product_get_short_id(OSINFO_PRODUCT(os)); fail_unless(g_str_equal(shortid, info->shortid), "ISO %s matched OS %s instead of expected %s", info->filename, shortid, info->shortid); + g_object_unref(G_OBJECT(os)); tmp = tmp->next; } |