diff options
author | Aleš Matěj <amatej@redhat.com> | 2019-04-10 16:04:35 +0300 |
---|---|---|
committer | Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com> | 2019-05-02 15:30:04 +0300 |
commit | fab3e4a183adad30577a42f2f7419802d5a42022 (patch) | |
tree | a18aa58249fa97befe4a1bd249e9c7c314d3d8f6 /tests | |
parent | a3c8f027af1f15c9e93c34a5ba3b82e8a3e630f9 (diff) |
Add unit tests for generalized --keep-all-metadata
Diffstat (limited to 'tests')
23 files changed, 508 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 878cfd9..19e91fa 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -10,6 +10,10 @@ ADD_EXECUTABLE(test_load_metadata test_load_metadata.c) TARGET_LINK_LIBRARIES(test_load_metadata libcreaterepo_c ${GLIB2_LIBRARIES}) ADD_DEPENDENCIES(tests test_load_metadata) +ADD_EXECUTABLE(test_locate_metadata test_locate_metadata.c) +TARGET_LINK_LIBRARIES(test_locate_metadata libcreaterepo_c ${GLIB2_LIBRARIES}) +ADD_DEPENDENCIES(tests test_locate_metadata) + ADD_EXECUTABLE(test_misc test_misc.c) TARGET_LINK_LIBRARIES(test_misc libcreaterepo_c ${GLIB2_LIBRARIES}) ADD_DEPENDENCIES(tests test_misc) diff --git a/tests/fixtures.h b/tests/fixtures.h index 1c501ec..594812b 100644 --- a/tests/fixtures.h +++ b/tests/fixtures.h @@ -35,6 +35,7 @@ #define TEST_REPO_KOJI_02 TEST_DATA_PATH"repo_koji_02/" #define TEST_FILES_PATH TEST_DATA_PATH"test_files/" #define TEST_UPDATEINFO_FILES_PATH TEST_DATA_PATH"updateinfo_files/" +#define TEST_REPO_WITH_ADDITIONAL_METADATA TEST_DATA_PATH"repo_with_additional_metadata/" // Repo files @@ -60,6 +61,14 @@ #define TEST_REPO_03_OTHER TEST_REPO_03"repodata/ef3e20691954c3d1318ec3071a982da339f4ed76967ded668b795c9e070aaab6-other.xml.gz" #define TEST_REPO_03_MODULEMD TEST_REPO_03"repodata/a850093e240506c728d6ce26a6fc51d6a7fe10730c67988d13afa7dd82df82d5-modules.yaml.xz" +#define TEST_REPO_WITH_ADDITIONAL_METADATA_REPOMD TEST_REPO_WITH_ADDITIONAL_METADATA"repodata/repomd.xml" +#define TEST_REPO_WITH_ADDITIONAL_METADATA_PRIMARY_XML_GZ TEST_REPO_WITH_ADDITIONAL_METADATA"repodata/490a2a494a3827b8a356f728ac36bc02fb009b0eaea173c890e727bb54219037-primary.xml.gz" +#define TEST_REPO_WITH_ADDITIONAL_METADATA_PRIMARY_SQLITE_BZ2 TEST_REPO_WITH_ADDITIONAL_METADATA"repodata/1e12239bf5cb07ec73c74482c35e80dabe30dbe2fdd57bd9e557d987cbacc8c2-primary.sqlite.bz2" +#define TEST_REPO_WITH_ADDITIONAL_METADATA_FILELISTS_XML_GZ TEST_REPO_WITH_ADDITIONAL_METADATA"repodata/ba5a4fdbb20e7b9b70d9a9abd974bcab1065b1e81d711f80e06ad8cae30c4183-filelists.xml.gz" +#define TEST_REPO_WITH_ADDITIONAL_METADATA_FILELISTS_SQLITE_BZ2 TEST_REPO_WITH_ADDITIONAL_METADATA"repodata/4f4de7d3254a033b84626f330bc6adb8a3c1a4a20f0ddbe30a5692a041318c81-filelists.sqlite.bz2" +#define TEST_REPO_WITH_ADDITIONAL_METADATA_OTHER_XML_GZ TEST_REPO_WITH_ADDITIONAL_METADATA"repodata/fd458a424a3f3e0dadc95b806674b79055c24e73637e47ad5a6e57926aa1b9d1-other.xml.gz" +#define TEST_REPO_WITH_ADDITIONAL_METADATA_OTHER_SQLITE_BZ2 TEST_REPO_WITH_ADDITIONAL_METADATA"repodata/8b13cba732c1a02b841f43d6791ca68788d45f376787d9f3ccf68e75f01af499-other.sqlite.bz2" + // Modified repo files (MFR) #define TEST_MRF_BAD_TYPE_FIL TEST_MODIFIED_REPO_FILES_PATH"bad_file_type-filelists.xml" diff --git a/tests/python/tests/fixtures.py b/tests/python/tests/fixtures.py index f6def3b..1888f74 100644 --- a/tests/python/tests/fixtures.py +++ b/tests/python/tests/fixtures.py @@ -86,6 +86,8 @@ REPO_02_FILXML = os.path.join(REPO_02_PATH, "repodata/", REPO_02_OTHXML = os.path.join(REPO_02_PATH, "repodata/", "ab5d3edeea50f9b4ec5ee13e4d25c147e318e3a433dbabc94d3461f58ac28255-other.xml.gz") +REPO_WITH_ADDITIONAL_METADATA = os.path.join(REPOS_PATH, "repo_with_additional_metadata") + # Test files FILE_BINARY = "binary_file" diff --git a/tests/python/tests/test_locate_metadata.py b/tests/python/tests/test_locate_metadata.py index 48f719d..0efc517 100644 --- a/tests/python/tests/test_locate_metadata.py +++ b/tests/python/tests/test_locate_metadata.py @@ -3,6 +3,13 @@ import createrepo_c as cr from .fixtures import * +def list_has_str_ending_with(l, s): + for e in l: + if e.endswith(s): + return True + return False + + class TestCaseMetadataLocation(unittest.TestCase): def test_metadatalocation(self): ml = cr.MetadataLocation(REPO_00_PATH, 1) @@ -17,3 +24,26 @@ class TestCaseMetadataLocation(unittest.TestCase): self.assertTrue(ml["group_gz"] is None) self.assertTrue(ml["updateinfo"] is None) self.assertTrue(ml["foobarxyz"] is None) + + ml = cr.MetadataLocation(REPO_WITH_ADDITIONAL_METADATA, 0) + self.assertTrue(ml) + self.assertTrue(ml["primary"].endswith("/repodata/490a2a494a3827b8a356f728ac36bc02fb009b0eaea173c890e727bb54219037-primary.xml.gz")) + self.assertTrue(ml["filelists"].endswith("/repodata/ba5a4fdbb20e7b9b70d9a9abd974bcab1065b1e81d711f80e06ad8cae30c4183-filelists.xml.gz")) + self.assertTrue(ml["other"].endswith("/repodata/fd458a424a3f3e0dadc95b806674b79055c24e73637e47ad5a6e57926aa1b9d1-other.xml.gz")) + self.assertTrue(ml["primary_db"].endswith("/repodata/1e12239bf5cb07ec73c74482c35e80dabe30dbe2fdd57bd9e557d987cbacc8c2-primary.sqlite.bz2")) + self.assertTrue(ml["filelists_db"].endswith("/repodata/4f4de7d3254a033b84626f330bc6adb8a3c1a4a20f0ddbe30a5692a041318c81-filelists.sqlite.bz2")) + self.assertTrue(ml["other_db"].endswith("/repodata/8b13cba732c1a02b841f43d6791ca68788d45f376787d9f3ccf68e75f01af499-other.sqlite.bz2")) + self.assertTrue(ml["group"].endswith("/repodata/04460bfaf6cb5af6b0925d8c99401a44e5192d287796aed4cced5f7ce881761f-comps.f20.xml")) + self.assertTrue(ml["group_gz"].endswith("/repodata/f9d860ddcb64fbdc88a9b71a14ddb9f5670968d5dd3430412565c13d42b6804d-comps.f20.xml.gz")) + self.assertTrue(ml["updateinfo"].endswith("/repodata/88514679cb03d8f51e850ad3639c089f899e83407a2380ef9e62873a8eb1db13-updateinfo_01.xml.gz")) + additional_metadata = ml["additional_metadata"] + self.assertTrue(len(additional_metadata) == 8) + self.assertTrue(list_has_str_ending_with(additional_metadata, "4fbad65c641f4f8fb3cec9b1672fcec2357443e1ea6e93541a0bb559c7dc9238-modules.yaml.gz")) + self.assertTrue(list_has_str_ending_with(additional_metadata, "cb0f4b5df8268f248158e50d66ee1565591bca23ee2dbd84ae9c457962fa3122-modules.yaml.gz.zck")) + self.assertTrue(list_has_str_ending_with(additional_metadata, "04460bfaf6cb5af6b0925d8c99401a44e5192d287796aed4cced5f7ce881761f-comps.f20.xml")) + self.assertTrue(list_has_str_ending_with(additional_metadata, "2bbdf70c4394e71c2d3905c143d460009d04359de5a90b72b47cdb9dbdcc079d-comps.f20.xml.zck")) + self.assertTrue(list_has_str_ending_with(additional_metadata, "2bbdf70c4394e71c2d3905c143d460009d04359de5a90b72b47cdb9dbdcc079d-comps.f20.xml.gz.zck")) + self.assertTrue(list_has_str_ending_with(additional_metadata, "f9d860ddcb64fbdc88a9b71a14ddb9f5670968d5dd3430412565c13d42b6804d-comps.f20.xml.gz")) + self.assertTrue(list_has_str_ending_with(additional_metadata, "88514679cb03d8f51e850ad3639c089f899e83407a2380ef9e62873a8eb1db13-updateinfo_01.xml.gz")) + self.assertTrue(list_has_str_ending_with(additional_metadata, "0219a2f1f9f32af6b7873905269ac1bc27b03e0caf3968c929a49e5a939e8935-updateinfo_01.xml.gz.zck")) + self.assertTrue(ml["foobarxyz"] is None) diff --git a/tests/test_locate_metadata.c b/tests/test_locate_metadata.c new file mode 100644 index 0000000..4f79c80 --- /dev/null +++ b/tests/test_locate_metadata.c @@ -0,0 +1,254 @@ +/* createrepo_c - Library of routines for manipulation with repodata + * Copyright (C) 2012 Tomas Mlcoch + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. + */ + +#include <glib.h> +#include <stdlib.h> +#include <stdio.h> +#include "fixtures.h" +#include "createrepo/error.h" +#include "createrepo/package.h" +#include "createrepo/misc.h" +#include "createrepo/locate_metadata.h" + + +static void test_cr_cmp_metadatum_type(void) +{ + //compare equal with not allocated strings + cr_Metadatum *m = g_malloc0(sizeof(cr_Metadatum)); + m->name = "/some/name/somewhere"; + m->type = "type"; + int out = cr_cmp_metadatum_type(m, "type"); + g_assert_cmpint(out, ==, 0); + + //compare equal with allocated strings + m->name = g_strdup_printf("group"); + m->type = g_strdup_printf("group"); + gchar *type = g_strdup_printf("group"); + out = cr_cmp_metadatum_type(m, type); + g_assert_cmpint(out, ==, 0); + cr_metadatum_free(m); + g_free(type); + + //compare bigger with allocated strings + m = g_malloc0(sizeof(cr_Metadatum)); + m->name = g_strdup_printf("name"); + m->type = g_strdup_printf("group"); + type = g_strdup_printf("grou"); + out = cr_cmp_metadatum_type(m, type); + g_assert_cmpint(out, >, 0); + cr_metadatum_free(m); + g_free(type); + + //compare smaller with allocated strings + m = g_malloc0(sizeof(cr_Metadatum)); + m->name = g_strdup_printf("name"); + m->type = g_strdup_printf("group"); + type = g_strdup_printf("groupppppp"); + out = cr_cmp_metadatum_type(m, type); + g_assert_cmpint(out, <, 0); + cr_metadatum_free(m); + g_free(type); +} + +static void test_cr_cmp_repomd_record_type(void) +{ + cr_RepomdRecord *r; + int out; + gchar *type; + + //compare equal with not allocated strings + r = g_malloc0(sizeof(cr_RepomdRecord)); + r->location_real = "/some/name/somewhere"; + r->type = "type"; + out = cr_cmp_repomd_record_type(r, "type"); + g_assert_cmpint(out, ==, 0); + g_free(r); + + //compare equal with allocated strings + r = cr_repomd_record_new("group", "/some/path/somewhere"); + type = g_strdup_printf("group"); + out = cr_cmp_repomd_record_type(r, type); + g_assert_cmpint(out, ==, 0); + cr_repomd_record_free(r); + g_free(type); + + //compare bigger with allocated strings + r = cr_repomd_record_new("group", "/some/path/somewhere"); + type = g_strdup_printf("grou"); + out = cr_cmp_repomd_record_type(r, type); + g_assert_cmpint(out, >, 0); + cr_repomd_record_free(r); + g_free(type); + + //compare smaller with allocated strings + r = cr_repomd_record_new("group", "/some/path/somewhere"); + type = g_strdup_printf("groupppppp"); + out = cr_cmp_metadatum_type(r, type); + g_assert_cmpint(out, <, 0); + cr_repomd_record_free(r); + g_free(type); +} + + +static void test_cr_copy_metadatum(void) +{ + //empty tmp_repo path + char *tmp_dir, *tmp_repo, *out, *new_name; + tmp_dir = g_strdup(TMPDIR_TEMPLATE); + g_assert(mkdtemp(tmp_dir)); + tmp_repo = g_strconcat(tmp_dir, "/", NULL); + g_assert_cmpint(g_mkdir_with_parents(tmp_repo, 0777), ==, 0); + + GError *err = NULL; + new_name = cr_copy_metadatum(TEST_REPO_00_PRIMARY, tmp_repo, &err); + out = g_strconcat(tmp_repo, "1cb61ea996355add02b1426ed4c1780ea75ce0c04c5d1107c025c3fbd7d8bcae-primary.xml.gz", NULL); + g_assert_cmpstr(new_name, ==, out); + g_assert_true(g_file_test(new_name, G_FILE_TEST_EXISTS)); + cr_remove_dir(tmp_repo, NULL); + + g_free(new_name); + g_free(out); + g_free(tmp_repo); + + //tmp_repo is a folder + tmp_repo = g_strconcat(tmp_dir, "/folder/", NULL); + err = NULL; + g_assert_cmpint(g_mkdir_with_parents(tmp_repo, 0777), ==, 0); + g_assert_true(g_file_test(tmp_repo, G_FILE_TEST_EXISTS)); + new_name = cr_copy_metadatum(TEST_REPO_00_PRIMARY, tmp_repo, &err); + out = g_strconcat(tmp_repo, "1cb61ea996355add02b1426ed4c1780ea75ce0c04c5d1107c025c3fbd7d8bcae-primary.xml.gz", NULL); + g_assert_cmpstr(new_name, ==, out); + g_assert_true(g_file_test(new_name, G_FILE_TEST_EXISTS)); + cr_remove_dir(tmp_repo, NULL); + + g_free(new_name); + g_free(out); + g_free(tmp_dir); + g_free(tmp_repo); +} + +static void test_cr_insert_additional_metadatum(void) +{ + //add to not allocated GSList + GSList *d; + cr_Metadatum *m; + + d = cr_insert_additional_metadatum("./test_path.xml", "group", d); + g_assert_true(d); + g_assert_cmpstr(((cr_Metadatum *) d->data)->type, ==, "group"); + g_assert_cmpstr(((cr_Metadatum *) d->data)->name, ==, "./test_path.xml"); + g_slist_free_full(d, (GDestroyNotify) cr_metadatum_free); + d = NULL; + + //replace one in list of one + m = g_malloc0(sizeof(cr_Metadatum)); + m->name = g_strdup_printf("name"); + m->type = g_strdup_printf("group"); + d = g_slist_prepend(d, m); + g_assert_cmpstr(((cr_Metadatum *) d->data)->type, ==, "group"); + g_assert_cmpstr(((cr_Metadatum *) d->data)->name, ==, "name"); + d = cr_insert_additional_metadatum("./test_path.xml", "group", d); + g_assert_true(d); + g_assert_cmpstr(((cr_Metadatum *) d->data)->type, ==, "group"); + g_assert_cmpstr(((cr_Metadatum *) d->data)->name, ==, "./test_path.xml"); + g_assert_cmpint(g_slist_length(d), ==, 1); + g_slist_free_full(d, (GDestroyNotify) cr_metadatum_free); + d = NULL; + + //add new one to list of one + m = g_malloc0(sizeof(cr_Metadatum)); + m->name = g_strdup_printf("name"); + m->type = g_strdup_printf("primary"); + d = g_slist_prepend(d, m); + d = cr_insert_additional_metadatum("./test_path.xml", "group", d); + g_assert_true(d); + g_assert_cmpstr(((cr_Metadatum *) d->data)->type, ==, "group"); + g_assert_cmpstr(((cr_Metadatum *) d->data)->name, ==, "./test_path.xml"); + g_assert_cmpint(g_slist_length(d), ==, 2); + m = g_slist_nth_data(d, 1); + g_assert_cmpstr(m->type, ==, "primary"); + g_assert_cmpstr(m->name, ==, "name"); + g_slist_free_full(d, (GDestroyNotify) cr_metadatum_free); + d = NULL; +} + +static void test_cr_parse_repomd(void) +{ + struct cr_MetadataLocation *ret = NULL; + ret = cr_parse_repomd(TEST_REPO_00_REPOMD, TEST_REPO_00, 1); + g_assert_cmpint(0, ==, g_slist_length(ret->additional_metadata)); + g_assert_cmpstr(TEST_REPO_00_REPOMD, ==, ret->repomd); + g_assert_cmpstr(TEST_REPO_00, ==, ret->local_path); + g_assert_cmpint(0, ==, ret->tmp); + g_assert_cmpstr(TEST_REPO_00_PRIMARY, ==, ret->pri_xml_href); + g_assert_cmpstr(TEST_REPO_00_OTHER, ==, ret->oth_xml_href); + g_assert_cmpstr(TEST_REPO_00_FILELISTS, ==, ret->fil_xml_href); +} + +static void test_cr_parse_repomd_with_additional_metadata(void) +{ + struct cr_MetadataLocation *ret = NULL; + ret = cr_parse_repomd(TEST_REPO_WITH_ADDITIONAL_METADATA_REPOMD, TEST_REPO_WITH_ADDITIONAL_METADATA, 0); + g_assert_cmpint(8, ==, g_slist_length(ret->additional_metadata)); + g_assert_cmpstr(TEST_REPO_WITH_ADDITIONAL_METADATA_REPOMD, ==, ret->repomd); + g_assert_cmpstr(TEST_REPO_WITH_ADDITIONAL_METADATA, ==, ret->local_path); + g_assert_cmpint(0, ==, ret->tmp); + + g_assert_cmpstr(TEST_REPO_WITH_ADDITIONAL_METADATA_PRIMARY_XML_GZ, ==, ret->pri_xml_href); + g_assert_cmpstr(TEST_REPO_WITH_ADDITIONAL_METADATA_OTHER_XML_GZ, ==, ret->oth_xml_href); + g_assert_cmpstr(TEST_REPO_WITH_ADDITIONAL_METADATA_FILELISTS_XML_GZ, ==, ret->fil_xml_href); + + g_assert_cmpstr(TEST_REPO_WITH_ADDITIONAL_METADATA_PRIMARY_SQLITE_BZ2, ==, ret->pri_sqlite_href); + g_assert_cmpstr(TEST_REPO_WITH_ADDITIONAL_METADATA_OTHER_SQLITE_BZ2, ==, ret->oth_sqlite_href); + g_assert_cmpstr(TEST_REPO_WITH_ADDITIONAL_METADATA_FILELISTS_SQLITE_BZ2, ==, ret->fil_sqlite_href); + + cr_Metadatum *metadatum = g_slist_find_custom(ret->additional_metadata, "group", cr_cmp_metadatum_type)->data; + g_assert(metadatum); + metadatum = g_slist_find_custom(ret->additional_metadata, "group_zck", cr_cmp_metadatum_type)->data; + g_assert(metadatum); + metadatum = g_slist_find_custom(ret->additional_metadata, "group_gz", cr_cmp_metadatum_type)->data; + g_assert(metadatum); + metadatum = g_slist_find_custom(ret->additional_metadata, "group_gz_zck", cr_cmp_metadatum_type)->data; + g_assert(metadatum); + metadatum = g_slist_find_custom(ret->additional_metadata, "modules", cr_cmp_metadatum_type)->data; + g_assert(metadatum); + metadatum = g_slist_find_custom(ret->additional_metadata, "modules_zck", cr_cmp_metadatum_type)->data; + g_assert(metadatum); + metadatum = g_slist_find_custom(ret->additional_metadata, "updateinfo", cr_cmp_metadatum_type)->data; + g_assert(metadatum); + metadatum = g_slist_find_custom(ret->additional_metadata, "updateinfo_zck", cr_cmp_metadatum_type)->data; + g_assert(metadatum); + + g_slist_free_full(ret->additional_metadata, (GDestroyNotify) cr_metadatum_free); +} + +int main(int argc, char *argv[]) +{ + g_test_init(&argc, &argv, NULL); + + g_test_add_func("/locate_metadata/test_cr_cmp_metadatum_type", test_cr_cmp_metadatum_type); + g_test_add_func("/locate_metadata/test_cr_cmp_repomd_record_type", test_cr_cmp_repomd_record_type); + g_test_add_func("/locate_metadata/test_cr_copy_metadatum", test_cr_copy_metadatum); + g_test_add_func("/locate_metadata/test_cr_insert_additional_metadatum", test_cr_insert_additional_metadatum); + + g_test_add_func("/locate_metadata/test_cr_parse_repomd", test_cr_parse_repomd); + g_test_add_func("/locate_metadata/test_cr_parse_repomd_with_additional_metadata", test_cr_parse_repomd_with_additional_metadata); + + return g_test_run(); +} diff --git a/tests/testdata/repo_with_additional_metadata/repodata/0219a2f1f9f32af6b7873905269ac1bc27b03e0caf3968c929a49e5a939e8935-updateinfo_01.xml.gz.zck b/tests/testdata/repo_with_additional_metadata/repodata/0219a2f1f9f32af6b7873905269ac1bc27b03e0caf3968c929a49e5a939e8935-updateinfo_01.xml.gz.zck Binary files differnew file mode 100644 index 0000000..a713676 --- /dev/null +++ b/tests/testdata/repo_with_additional_metadata/repodata/0219a2f1f9f32af6b7873905269ac1bc27b03e0caf3968c929a49e5a939e8935-updateinfo_01.xml.gz.zck diff --git a/tests/testdata/repo_with_additional_metadata/repodata/04460bfaf6cb5af6b0925d8c99401a44e5192d287796aed4cced5f7ce881761f-comps.f20.xml b/tests/testdata/repo_with_additional_metadata/repodata/04460bfaf6cb5af6b0925d8c99401a44e5192d287796aed4cced5f7ce881761f-comps.f20.xml new file mode 100644 index 0000000..3bb1909 --- /dev/null +++ b/tests/testdata/repo_with_additional_metadata/repodata/04460bfaf6cb5af6b0925d8c99401a44e5192d287796aed4cced5f7ce881761f-comps.f20.xml @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE comps PUBLIC "-//Red Hat, Inc.//DTD Comps info//EN" "comps.dtd"> +<comps> + <group> + <id>20d-printing</id> + <name>20D Printing</name> + <description>3D printing software</description> + <default>false</default> + <uservisible>true</uservisible> + <packagelist> + <packagereq type="default">blender</packagereq> + <packagereq type="default">cura</packagereq> + </packagelist> + </group> + <environment> + <id>gnome-desktop-environment</id> + <name>GNOME Desktop</name> + <name xml:lang="cs">Pracovní prostředí GNOME</name> + <name xml:lang="de">GNOME-Desktop</name> + <description>GNOME is a highly intuitive and user friendly desktop environment.</description> + <description xml:lang="cs">GNOME je velmi intuitivní a uživatelsky přívětivé pracovní prostředí.</description> + <description xml:lang="de">GNOME ist eine hoch-intuitive und benutzerfreundliche Benutzeroberfläche</description> + <display_order>5</display_order> + <grouplist> + <groupid>base-x</groupid> + </grouplist> + <optionlist> + <groupid>3d-printing</groupid> + </optionlist> + </environment> + <category> + <id>gnome-desktop-environment</id> + <name>GNOME Desktop</name> + <name xml:lang="cs">Pracovní prostředí GNOME</name> + <name xml:lang="de">GNOME-Desktop</name> + <description>GNOME is a highly intuitive and user friendly desktop environment.</description> + <description xml:lang="cs">GNOME je velmi intuitivní a uživatelsky přívětivé pracovní prostředí.</description> + <description xml:lang="de">GNOME ist eine hoch-intuitive und benutzerfreundliche Benutzeroberfläche</description> + <display_order>5</display_order> + <grouplist> + <groupid>firefox</groupid> + <groupid>gnome-desktop</groupid> + <groupid>gnome-games</groupid> + <groupid>epiphany</groupid> + <groupid>libreoffice</groupid> + </grouplist> + </category> + <langpacks> + <match name="LabPlot-doc" install="LabPlot-doc-%s"/> + <match name="aspell" install="aspell-%s"/> + </langpacks> + <blacklist> + <package name="dev"/> + <package name="NetworkManager" arch="i386"/> + </blacklist> + <whiteout> + <ignoredep requires="Mesa" package="XFree86"/> + <ignoredep requires="XFree86-Mesa-libGL" package="XFree86-libs"/> + </whiteout> +</comps> diff --git a/tests/testdata/repo_with_additional_metadata/repodata/1e12239bf5cb07ec73c74482c35e80dabe30dbe2fdd57bd9e557d987cbacc8c2-primary.sqlite.bz2 b/tests/testdata/repo_with_additional_metadata/repodata/1e12239bf5cb07ec73c74482c35e80dabe30dbe2fdd57bd9e557d987cbacc8c2-primary.sqlite.bz2 Binary files differnew file mode 100644 index 0000000..e25b622 --- /dev/null +++ b/tests/testdata/repo_with_additional_metadata/repodata/1e12239bf5cb07ec73c74482c35e80dabe30dbe2fdd57bd9e557d987cbacc8c2-primary.sqlite.bz2 diff --git a/tests/testdata/repo_with_additional_metadata/repodata/2bbdf70c4394e71c2d3905c143d460009d04359de5a90b72b47cdb9dbdcc079d-comps.f20.xml.gz.zck b/tests/testdata/repo_with_additional_metadata/repodata/2bbdf70c4394e71c2d3905c143d460009d04359de5a90b72b47cdb9dbdcc079d-comps.f20.xml.gz.zck Binary files differnew file mode 100644 index 0000000..4d87343 --- /dev/null +++ b/tests/testdata/repo_with_additional_metadata/repodata/2bbdf70c4394e71c2d3905c143d460009d04359de5a90b72b47cdb9dbdcc079d-comps.f20.xml.gz.zck diff --git a/tests/testdata/repo_with_additional_metadata/repodata/2bbdf70c4394e71c2d3905c143d460009d04359de5a90b72b47cdb9dbdcc079d-comps.f20.xml.zck b/tests/testdata/repo_with_additional_metadata/repodata/2bbdf70c4394e71c2d3905c143d460009d04359de5a90b72b47cdb9dbdcc079d-comps.f20.xml.zck Binary files differnew file mode 100644 index 0000000..4d87343 --- /dev/null +++ b/tests/testdata/repo_with_additional_metadata/repodata/2bbdf70c4394e71c2d3905c143d460009d04359de5a90b72b47cdb9dbdcc079d-comps.f20.xml.zck diff --git a/tests/testdata/repo_with_additional_metadata/repodata/3d6eaa7c77ef92586470dd6a542478e42cc421a85f12e0db93aa783077704cd0-filelists.xml.zck b/tests/testdata/repo_with_additional_metadata/repodata/3d6eaa7c77ef92586470dd6a542478e42cc421a85f12e0db93aa783077704cd0-filelists.xml.zck Binary files differnew file mode 100644 index 0000000..21c49ca --- /dev/null +++ b/tests/testdata/repo_with_additional_metadata/repodata/3d6eaa7c77ef92586470dd6a542478e42cc421a85f12e0db93aa783077704cd0-filelists.xml.zck diff --git a/tests/testdata/repo_with_additional_metadata/repodata/490a2a494a3827b8a356f728ac36bc02fb009b0eaea173c890e727bb54219037-primary.xml.gz b/tests/testdata/repo_with_additional_metadata/repodata/490a2a494a3827b8a356f728ac36bc02fb009b0eaea173c890e727bb54219037-primary.xml.gz Binary files differnew file mode 100644 index 0000000..3fd88ed --- /dev/null +++ b/tests/testdata/repo_with_additional_metadata/repodata/490a2a494a3827b8a356f728ac36bc02fb009b0eaea173c890e727bb54219037-primary.xml.gz diff --git a/tests/testdata/repo_with_additional_metadata/repodata/4f4de7d3254a033b84626f330bc6adb8a3c1a4a20f0ddbe30a5692a041318c81-filelists.sqlite.bz2 b/tests/testdata/repo_with_additional_metadata/repodata/4f4de7d3254a033b84626f330bc6adb8a3c1a4a20f0ddbe30a5692a041318c81-filelists.sqlite.bz2 Binary files differnew file mode 100644 index 0000000..79b7697 --- /dev/null +++ b/tests/testdata/repo_with_additional_metadata/repodata/4f4de7d3254a033b84626f330bc6adb8a3c1a4a20f0ddbe30a5692a041318c81-filelists.sqlite.bz2 diff --git a/tests/testdata/repo_with_additional_metadata/repodata/4fbad65c641f4f8fb3cec9b1672fcec2357443e1ea6e93541a0bb559c7dc9238-modules.yaml.gz b/tests/testdata/repo_with_additional_metadata/repodata/4fbad65c641f4f8fb3cec9b1672fcec2357443e1ea6e93541a0bb559c7dc9238-modules.yaml.gz Binary files differnew file mode 100644 index 0000000..8a22a1e --- /dev/null +++ b/tests/testdata/repo_with_additional_metadata/repodata/4fbad65c641f4f8fb3cec9b1672fcec2357443e1ea6e93541a0bb559c7dc9238-modules.yaml.gz diff --git a/tests/testdata/repo_with_additional_metadata/repodata/88514679cb03d8f51e850ad3639c089f899e83407a2380ef9e62873a8eb1db13-updateinfo_01.xml.gz b/tests/testdata/repo_with_additional_metadata/repodata/88514679cb03d8f51e850ad3639c089f899e83407a2380ef9e62873a8eb1db13-updateinfo_01.xml.gz Binary files differnew file mode 100644 index 0000000..f08eaf0 --- /dev/null +++ b/tests/testdata/repo_with_additional_metadata/repodata/88514679cb03d8f51e850ad3639c089f899e83407a2380ef9e62873a8eb1db13-updateinfo_01.xml.gz diff --git a/tests/testdata/repo_with_additional_metadata/repodata/8b13cba732c1a02b841f43d6791ca68788d45f376787d9f3ccf68e75f01af499-other.sqlite.bz2 b/tests/testdata/repo_with_additional_metadata/repodata/8b13cba732c1a02b841f43d6791ca68788d45f376787d9f3ccf68e75f01af499-other.sqlite.bz2 Binary files differnew file mode 100644 index 0000000..bdeb36f --- /dev/null +++ b/tests/testdata/repo_with_additional_metadata/repodata/8b13cba732c1a02b841f43d6791ca68788d45f376787d9f3ccf68e75f01af499-other.sqlite.bz2 diff --git a/tests/testdata/repo_with_additional_metadata/repodata/ba5a4fdbb20e7b9b70d9a9abd974bcab1065b1e81d711f80e06ad8cae30c4183-filelists.xml.gz b/tests/testdata/repo_with_additional_metadata/repodata/ba5a4fdbb20e7b9b70d9a9abd974bcab1065b1e81d711f80e06ad8cae30c4183-filelists.xml.gz Binary files differnew file mode 100644 index 0000000..29bdcf1 --- /dev/null +++ b/tests/testdata/repo_with_additional_metadata/repodata/ba5a4fdbb20e7b9b70d9a9abd974bcab1065b1e81d711f80e06ad8cae30c4183-filelists.xml.gz diff --git a/tests/testdata/repo_with_additional_metadata/repodata/c5582e660ed9a2d3c10ba44f0aeb02f2bb70e85dc3c8cda4266183d4e5235aa7-other.xml.zck b/tests/testdata/repo_with_additional_metadata/repodata/c5582e660ed9a2d3c10ba44f0aeb02f2bb70e85dc3c8cda4266183d4e5235aa7-other.xml.zck Binary files differnew file mode 100644 index 0000000..d60020b --- /dev/null +++ b/tests/testdata/repo_with_additional_metadata/repodata/c5582e660ed9a2d3c10ba44f0aeb02f2bb70e85dc3c8cda4266183d4e5235aa7-other.xml.zck diff --git a/tests/testdata/repo_with_additional_metadata/repodata/cb0f4b5df8268f248158e50d66ee1565591bca23ee2dbd84ae9c457962fa3122-modules.yaml.gz.zck b/tests/testdata/repo_with_additional_metadata/repodata/cb0f4b5df8268f248158e50d66ee1565591bca23ee2dbd84ae9c457962fa3122-modules.yaml.gz.zck Binary files differnew file mode 100644 index 0000000..1f4df67 --- /dev/null +++ b/tests/testdata/repo_with_additional_metadata/repodata/cb0f4b5df8268f248158e50d66ee1565591bca23ee2dbd84ae9c457962fa3122-modules.yaml.gz.zck diff --git a/tests/testdata/repo_with_additional_metadata/repodata/e9e6ca4765de75cc3b2bf05e6cf631703c6557edd642300748d7747000547365-primary.xml.zck b/tests/testdata/repo_with_additional_metadata/repodata/e9e6ca4765de75cc3b2bf05e6cf631703c6557edd642300748d7747000547365-primary.xml.zck Binary files differnew file mode 100644 index 0000000..8f9da79 --- /dev/null +++ b/tests/testdata/repo_with_additional_metadata/repodata/e9e6ca4765de75cc3b2bf05e6cf631703c6557edd642300748d7747000547365-primary.xml.zck diff --git a/tests/testdata/repo_with_additional_metadata/repodata/f9d860ddcb64fbdc88a9b71a14ddb9f5670968d5dd3430412565c13d42b6804d-comps.f20.xml.gz b/tests/testdata/repo_with_additional_metadata/repodata/f9d860ddcb64fbdc88a9b71a14ddb9f5670968d5dd3430412565c13d42b6804d-comps.f20.xml.gz Binary files differnew file mode 100644 index 0000000..8a63419 --- /dev/null +++ b/tests/testdata/repo_with_additional_metadata/repodata/f9d860ddcb64fbdc88a9b71a14ddb9f5670968d5dd3430412565c13d42b6804d-comps.f20.xml.gz diff --git a/tests/testdata/repo_with_additional_metadata/repodata/fd458a424a3f3e0dadc95b806674b79055c24e73637e47ad5a6e57926aa1b9d1-other.xml.gz b/tests/testdata/repo_with_additional_metadata/repodata/fd458a424a3f3e0dadc95b806674b79055c24e73637e47ad5a6e57926aa1b9d1-other.xml.gz Binary files differnew file mode 100644 index 0000000..88f8448 --- /dev/null +++ b/tests/testdata/repo_with_additional_metadata/repodata/fd458a424a3f3e0dadc95b806674b79055c24e73637e47ad5a6e57926aa1b9d1-other.xml.gz diff --git a/tests/testdata/repo_with_additional_metadata/repodata/repomd.xml b/tests/testdata/repo_with_additional_metadata/repodata/repomd.xml new file mode 100644 index 0000000..bd26e37 --- /dev/null +++ b/tests/testdata/repo_with_additional_metadata/repodata/repomd.xml @@ -0,0 +1,149 @@ +<?xml version="1.0" encoding="UTF-8"?> +<repomd xmlns="http://linux.duke.edu/metadata/repo" xmlns:rpm="http://linux.duke.edu/metadata/rpm"> + <revision>1554795405</revision> + <data type="primary"> + <checksum type="sha256">490a2a494a3827b8a356f728ac36bc02fb009b0eaea173c890e727bb54219037</checksum> + <open-checksum type="sha256">6b17727c89bb6fe4737038ab35eef884442760a3a93adea506486a753f6bff48</open-checksum> + <location href="repodata/490a2a494a3827b8a356f728ac36bc02fb009b0eaea173c890e727bb54219037-primary.xml.gz"/> + <timestamp>1554795405</timestamp> + <size>1287</size> + <open-size>5025</open-size> + </data> + <data type="filelists"> + <checksum type="sha256">ba5a4fdbb20e7b9b70d9a9abd974bcab1065b1e81d711f80e06ad8cae30c4183</checksum> + <open-checksum type="sha256">8fd9fb8389693db44ab145f4b10d65e4b180ed78894214820a9da1d1433fe212</open-checksum> + <location href="repodata/ba5a4fdbb20e7b9b70d9a9abd974bcab1065b1e81d711f80e06ad8cae30c4183-filelists.xml.gz"/> + <timestamp>1554795405</timestamp> + <size>749</size> + <open-size>3880</open-size> + </data> + <data type="other"> + <checksum type="sha256">fd458a424a3f3e0dadc95b806674b79055c24e73637e47ad5a6e57926aa1b9d1</checksum> + <open-checksum type="sha256">9a94f6e50815385c9a46c29402df8116be16b6f8a30fc09e82cc0705298d3767</open-checksum> + <location href="repodata/fd458a424a3f3e0dadc95b806674b79055c24e73637e47ad5a6e57926aa1b9d1-other.xml.gz"/> + <timestamp>1554795405</timestamp> + <size>687</size> + <open-size>1747</open-size> + </data> + <data type="primary_db"> + <checksum type="sha256">1e12239bf5cb07ec73c74482c35e80dabe30dbe2fdd57bd9e557d987cbacc8c2</checksum> + <open-checksum type="sha256">7566198f37630c89ea115c282c93405fb1363ca6fdf2a8ece1aae266485b55dc</open-checksum> + <location href="repodata/1e12239bf5cb07ec73c74482c35e80dabe30dbe2fdd57bd9e557d987cbacc8c2-primary.sqlite.bz2"/> + <timestamp>1554795405</timestamp> + <size>3775</size> + <open-size>106496</open-size> + <database_version>10</database_version> + </data> + <data type="filelists_db"> + <checksum type="sha256">4f4de7d3254a033b84626f330bc6adb8a3c1a4a20f0ddbe30a5692a041318c81</checksum> + <open-checksum type="sha256">265e0354eba7f9b530dd39f3367d22bc0f09566956949ce8a72398541ba31930</open-checksum> + <location href="repodata/4f4de7d3254a033b84626f330bc6adb8a3c1a4a20f0ddbe30a5692a041318c81-filelists.sqlite.bz2"/> + <timestamp>1554795405</timestamp> + <size>1519</size> + <open-size>28672</open-size> + <database_version>10</database_version> + </data> + <data type="other_db"> + <checksum type="sha256">8b13cba732c1a02b841f43d6791ca68788d45f376787d9f3ccf68e75f01af499</checksum> + <open-checksum type="sha256">580857174c525b3b80af5a33ae194b88c33194206769bc286d35a02d4f6ab374</open-checksum> + <location href="repodata/8b13cba732c1a02b841f43d6791ca68788d45f376787d9f3ccf68e75f01af499-other.sqlite.bz2"/> + <timestamp>1554795405</timestamp> + <size>1301</size> + <open-size>24576</open-size> + <database_version>10</database_version> + </data> + <data type="primary_zck"> + <checksum type="sha256">e9e6ca4765de75cc3b2bf05e6cf631703c6557edd642300748d7747000547365</checksum> + <open-checksum type="sha256">6b17727c89bb6fe4737038ab35eef884442760a3a93adea506486a753f6bff48</open-checksum> + <header-checksum type="sha256">5809d2657156017d46bd3c3acbf06f78947f0fc516652251b5ca7f7b459d9737</header-checksum> + <location href="repodata/e9e6ca4765de75cc3b2bf05e6cf631703c6557edd642300748d7747000547365-primary.xml.zck"/> + <timestamp>1554795405</timestamp> + <size>1482</size> + <open-size>5025</open-size> + <header-size>134</header-size> + </data> + <data type="filelists_zck"> + <checksum type="sha256">3d6eaa7c77ef92586470dd6a542478e42cc421a85f12e0db93aa783077704cd0</checksum> + <open-checksum type="sha256">8fd9fb8389693db44ab145f4b10d65e4b180ed78894214820a9da1d1433fe212</open-checksum> + <header-checksum type="sha256">4178f7623da3e57ca1edf873ca6bd41f82a10afbc10087d062ec328482eb1096</header-checksum> + <location href="repodata/3d6eaa7c77ef92586470dd6a542478e42cc421a85f12e0db93aa783077704cd0-filelists.xml.zck"/> + <timestamp>1554795405</timestamp> + <size>932</size> + <open-size>3880</open-size> + <header-size>133</header-size> + </data> + <data type="other_zck"> + <checksum type="sha256">c5582e660ed9a2d3c10ba44f0aeb02f2bb70e85dc3c8cda4266183d4e5235aa7</checksum> + <open-checksum type="sha256">9a94f6e50815385c9a46c29402df8116be16b6f8a30fc09e82cc0705298d3767</open-checksum> + <header-checksum type="sha256">c49fa7ec9ada1b3916bd272bfa3e4e1c847f2dab0bd82bccc504e5ab40518ac8</header-checksum> + <location href="repodata/c5582e660ed9a2d3c10ba44f0aeb02f2bb70e85dc3c8cda4266183d4e5235aa7-other.xml.zck"/> + <timestamp>1554795405</timestamp> + <size>850</size> + <open-size>1747</open-size> + <header-size>133</header-size> + </data> + <data type="group"> + <checksum type="sha256">04460bfaf6cb5af6b0925d8c99401a44e5192d287796aed4cced5f7ce881761f</checksum> + <location href="repodata/04460bfaf6cb5af6b0925d8c99401a44e5192d287796aed4cced5f7ce881761f-comps.f20.xml"/> + <timestamp>1554795405</timestamp> + <size>2366</size> + </data> + <data type="group_gz"> + <checksum type="sha256">f9d860ddcb64fbdc88a9b71a14ddb9f5670968d5dd3430412565c13d42b6804d</checksum> + <location href="repodata/f9d860ddcb64fbdc88a9b71a14ddb9f5670968d5dd3430412565c13d42b6804d-comps.f20.xml.gz"/> + <timestamp>1554795405</timestamp> + <size>748</size> + </data> + <data type="group_gz_zck"> + <checksum type="sha256">2bbdf70c4394e71c2d3905c143d460009d04359de5a90b72b47cdb9dbdcc079d</checksum> + <open-checksum type="sha256">04460bfaf6cb5af6b0925d8c99401a44e5192d287796aed4cced5f7ce881761f</open-checksum> + <header-checksum type="sha256">c2cedd24f17c1e0d3eff844e94725bd1d1dcb51cce9ef421d0a1cf4c7826c2b1</header-checksum> + <location href="repodata/2bbdf70c4394e71c2d3905c143d460009d04359de5a90b72b47cdb9dbdcc079d-comps.f20.xml.gz.zck"/> + <timestamp>1554795405</timestamp> + <size>864</size> + <open-size>2366</open-size> + <header-size>115</header-size> + </data> + <data type="group_zck"> + <checksum type="sha256">2bbdf70c4394e71c2d3905c143d460009d04359de5a90b72b47cdb9dbdcc079d</checksum> + <open-checksum type="sha256">04460bfaf6cb5af6b0925d8c99401a44e5192d287796aed4cced5f7ce881761f</open-checksum> + <header-checksum type="sha256">c2cedd24f17c1e0d3eff844e94725bd1d1dcb51cce9ef421d0a1cf4c7826c2b1</header-checksum> + <location href="repodata/2bbdf70c4394e71c2d3905c143d460009d04359de5a90b72b47cdb9dbdcc079d-comps.f20.xml.zck"/> + <timestamp>1554795405</timestamp> + <size>864</size> + <open-size>2366</open-size> + <header-size>115</header-size> + </data> + <data type="modules"> + <checksum type="sha256">4fbad65c641f4f8fb3cec9b1672fcec2357443e1ea6e93541a0bb559c7dc9238</checksum> + <location href="repodata/4fbad65c641f4f8fb3cec9b1672fcec2357443e1ea6e93541a0bb559c7dc9238-modules.yaml.gz"/> + <timestamp>1554795405</timestamp> + <size>88281</size> + </data> + <data type="modules_zck"> + <checksum type="sha256">cb0f4b5df8268f248158e50d66ee1565591bca23ee2dbd84ae9c457962fa3122</checksum> + <open-checksum type="sha256">280f628a881d302ba62856fb08ac3894c16cb1b9fa6d0b0aa2cd2b561db0b18e</open-checksum> + <header-checksum type="sha256">f5528bdad44c630b742069a05a270cd5bf320810e20861e9ec5723e85ddf5c5e</header-checksum> + <location href="repodata/cb0f4b5df8268f248158e50d66ee1565591bca23ee2dbd84ae9c457962fa3122-modules.yaml.gz.zck"/> + <timestamp>1554795405</timestamp> + <size>86680</size> + <open-size>511344</open-size> + <header-size>328</header-size> + </data> + <data type="updateinfo"> + <checksum type="sha256">88514679cb03d8f51e850ad3639c089f899e83407a2380ef9e62873a8eb1db13</checksum> + <location href="repodata/88514679cb03d8f51e850ad3639c089f899e83407a2380ef9e62873a8eb1db13-updateinfo_01.xml.gz"/> + <timestamp>1554795405</timestamp> + <size>533</size> + </data> + <data type="updateinfo_zck"> + <checksum type="sha256">0219a2f1f9f32af6b7873905269ac1bc27b03e0caf3968c929a49e5a939e8935</checksum> + <open-checksum type="sha256">88514679cb03d8f51e850ad3639c089f899e83407a2380ef9e62873a8eb1db13</open-checksum> + <header-checksum type="sha256">648324a2d3e603bf1bc134d6ee8c1a66cb0acb7fe0f96bb2a6fcdfe509406481</header-checksum> + <location href="repodata/0219a2f1f9f32af6b7873905269ac1bc27b03e0caf3968c929a49e5a939e8935-updateinfo_01.xml.gz.zck"/> + <timestamp>1554795405</timestamp> + <size>656</size> + <open-size>533</open-size> + <header-size>115</header-size> + </data> +</repomd> |