Skip to content

Commit

Permalink
createrepo_c tools: switch default compression to zstd
Browse files Browse the repository at this point in the history
In a couple places where option `--compress-type` was used with `zstd`
its switched to `gz` so the test still tests the option.
  • Loading branch information
kontura authored and jan-kolarik committed Jun 13, 2023
1 parent e930af2 commit 6c813fe
Show file tree
Hide file tree
Showing 18 changed files with 338 additions and 338 deletions.
6 changes: 3 additions & 3 deletions dnf-behave-tests/createrepo_c/bad-packages.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ Given I create directory "/temp-repo/"
And repodata "/temp-repo/repodata/" are consistent
And repodata in "/temp-repo/repodata/" is
| Type | File | Checksum Type | Compression Type |
| primary | ${checksum}-primary.xml.gz | sha256 | gz |
| filelists | ${checksum}-filelists.xml.gz | sha256 | gz |
| other | ${checksum}-other.xml.gz | sha256 | gz |
| primary | ${checksum}-primary.xml.zst | sha256 | zstd |
| filelists | ${checksum}-filelists.xml.zst | sha256 | zstd |
| other | ${checksum}-other.xml.zst | sha256 | zstd |
And primary in "/temp-repo/repodata" has only packages
| Name | Epoch | Version | Release | Architecture |
| package | 0 | 0.2.1 | 1.fc29 | x86_64 |
Expand Down
12 changes: 6 additions & 6 deletions dnf-behave-tests/createrepo_c/cache.feature
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ Given I copy file "{context.scenario.repos_location}/createrepo_c-ci-packages/x8
And repodata "/repodata/" are consistent
And repodata in "/repodata/" is
| Type | File | Checksum Type | Compression Type |
| primary | ${checksum}-primary.xml.gz | sha256 | gz |
| filelists | ${checksum}-filelists.xml.gz | sha256 | gz |
| other | ${checksum}-other.xml.gz | sha256 | gz |
| primary | ${checksum}-primary.xml.zst | sha256 | zstd |
| filelists | ${checksum}-filelists.xml.zst | sha256 | zstd |
| other | ${checksum}-other.xml.zst | sha256 | zstd |
And primary in "/repodata" has only packages
| Name | Epoch | Version | Release | Architecture |
| package | 0 | 0.2.1 | 1.fc29 | x86_64 |
Expand All @@ -24,9 +24,9 @@ Given I copy file "{context.scenario.repos_location}/createrepo_c-ci-packages/x8
And repodata "/repodata/" are consistent
And repodata in "/repodata/" is
| Type | File | Checksum Type | Compression Type |
| primary | ${checksum}-primary.xml.gz | sha256 | gz |
| filelists | ${checksum}-filelists.xml.gz | sha256 | gz |
| other | ${checksum}-other.xml.gz | sha256 | gz |
| primary | ${checksum}-primary.xml.zst | sha256 | zstd |
| filelists | ${checksum}-filelists.xml.zst | sha256 | zstd |
| other | ${checksum}-other.xml.zst | sha256 | zstd |
And primary in "/repodata" has only packages
| Name | Epoch | Version | Release | Architecture |
| package | 0 | 0.2.1 | 1.fc29 | x86_64 |
Expand Down
10 changes: 5 additions & 5 deletions dnf-behave-tests/createrepo_c/compression.feature
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@ Given I create file "/groupfile.xml" with
<comps>
</comps>
"""
When I execute createrepo_c with args "--compress-type zstd --groupfile groupfile.xml ." in "/"
When I execute createrepo_c with args "--compress-type gz --groupfile groupfile.xml ." in "/"
Then the exit code is 0
And repodata "/repodata/" are consistent
And repodata in "/repodata/" is
| Type | File | Checksum Type | Compression Type |
| primary | ${checksum}-primary.xml.gz | sha256 | gz |
| filelists | ${checksum}-filelists.xml.gz | sha256 | gz |
| other | ${checksum}-other.xml.gz | sha256 | gz |
| primary | ${checksum}-primary.xml.zst | sha256 | zstd |
| filelists | ${checksum}-filelists.xml.zst | sha256 | zstd |
| other | ${checksum}-other.xml.zst | sha256 | zstd |
| group | ${checksum}-groupfile.xml | sha256 | - |
| group_zstd | ${checksum}-groupfile.xml.zst | sha256 | zstd |
| group_zstd | ${checksum}-groupfile.xml.gz | sha256 | gz |
And primary in "/repodata/" doesn't have any packages


Expand Down
40 changes: 20 additions & 20 deletions dnf-behave-tests/createrepo_c/delta-rpms.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ Scenario: --deltas on empty repo
And repodata "/repodata/" are consistent
And repodata in "/repodata/" is
| Type | File | Checksum Type | Compression Type |
| primary | ${checksum}-primary.xml.gz | sha256 | gz |
| filelists | ${checksum}-filelists.xml.gz | sha256 | gz |
| other | ${checksum}-other.xml.gz | sha256 | gz |
| prestodelta | ${checksum}-prestodelta.xml.gz | sha256 | gz |
| primary | ${checksum}-primary.xml.zst | sha256 | zstd |
| filelists | ${checksum}-filelists.xml.zst | sha256 | zstd |
| other | ${checksum}-other.xml.zst | sha256 | zstd |
| prestodelta | ${checksum}-prestodelta.xml.zst | sha256 | zstd |


Scenario: --deltas on repo
Expand All @@ -22,10 +22,10 @@ Given I copy file "{context.scenario.repos_location}/createrepo_c-ci-packages/x8
And repodata "/repodata/" are consistent
And repodata in "/repodata/" is
| Type | File | Checksum Type | Compression Type |
| primary | ${checksum}-primary.xml.gz | sha256 | gz |
| filelists | ${checksum}-filelists.xml.gz | sha256 | gz |
| other | ${checksum}-other.xml.gz | sha256 | gz |
| prestodelta | ${checksum}-prestodelta.xml.gz | sha256 | gz |
| primary | ${checksum}-primary.xml.zst | sha256 | zstd |
| filelists | ${checksum}-filelists.xml.zst | sha256 | zstd |
| other | ${checksum}-other.xml.zst | sha256 | zstd |
| prestodelta | ${checksum}-prestodelta.xml.zst | sha256 | zstd |


Scenario: --deltas with empty --oldpackagedirs on repo
Expand All @@ -36,10 +36,10 @@ Given I copy file "{context.scenario.repos_location}/createrepo_c-ci-packages/x8
And repodata "/repodata/" are consistent
And repodata in "/repodata/" is
| Type | File | Checksum Type | Compression Type |
| primary | ${checksum}-primary.xml.gz | sha256 | gz |
| filelists | ${checksum}-filelists.xml.gz | sha256 | gz |
| other | ${checksum}-other.xml.gz | sha256 | gz |
| prestodelta | ${checksum}-prestodelta.xml.gz | sha256 | gz |
| primary | ${checksum}-primary.xml.zst | sha256 | zstd |
| filelists | ${checksum}-filelists.xml.zst | sha256 | zstd |
| other | ${checksum}-other.xml.zst | sha256 | zstd |
| prestodelta | ${checksum}-prestodelta.xml.zst | sha256 | zstd |


Scenario: --deltas with --oldpackagedirs on repo generates drpm
Expand All @@ -51,10 +51,10 @@ Given I copy file "{context.scenario.repos_location}/createrepo_c-ci-packages-2/
And repodata "/repodata/" are consistent
And repodata in "/repodata/" is
| Type | File | Checksum Type | Compression Type |
| primary | ${checksum}-primary.xml.gz | sha256 | gz |
| filelists | ${checksum}-filelists.xml.gz | sha256 | gz |
| other | ${checksum}-other.xml.gz | sha256 | gz |
| prestodelta | ${checksum}-prestodelta.xml.gz | sha256 | gz |
| primary | ${checksum}-primary.xml.zst | sha256 | zstd |
| filelists | ${checksum}-filelists.xml.zst | sha256 | zstd |
| other | ${checksum}-other.xml.zst | sha256 | zstd |
| prestodelta | ${checksum}-prestodelta.xml.zst | sha256 | zstd |
And file "/drpms/package-0.2.1-1.fc29_0.3.1-1.fc29.x86_64.drpm" exists


Expand All @@ -68,10 +68,10 @@ Given I copy file "{context.scenario.repos_location}/createrepo_c-ci-packages/x8
And repodata "/repodata/" are consistent
And repodata in "/repodata/" is
| Type | File | Checksum Type | Compression Type |
| primary | ${checksum}-primary.xml.gz | sha256 | gz |
| filelists | ${checksum}-filelists.xml.gz | sha256 | gz |
| other | ${checksum}-other.xml.gz | sha256 | gz |
| prestodelta | ${checksum}-prestodelta.xml.gz | sha256 | gz |
| primary | ${checksum}-primary.xml.zst | sha256 | zstd |
| filelists | ${checksum}-filelists.xml.zst | sha256 | zstd |
| other | ${checksum}-other.xml.zst | sha256 | zstd |
| prestodelta | ${checksum}-prestodelta.xml.zst | sha256 | zstd |
And file "/drpms/zstd-package-0.2.1-1.fc29_0.3.1-1.fc29.x86_64.drpm" exists
And I successfully execute "rpm -qp --qf '%{{PAYLOADCOMPRESSOR}}\n' {context.scenario.default_tmp_dir}/drpms/zstd-package-0.2.1-1.fc29_0.3.1-1.fc29.x86_64.drpm"
And stdout is
Expand Down
Loading

0 comments on commit 6c813fe

Please sign in to comment.