Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for multiple collections in one update for modular updateinfo #909

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
66 changes: 59 additions & 7 deletions dnf-behave-tests/features/module/updateinfo.feature
@@ -1,13 +1,10 @@
Feature: Advisory aplicability on a modular system


Background:
Given I use repository "dnf-ci-fedora-modular"
And I use repository "dnf-ci-fedora"


@bz1622614
Scenario: List available updates for installed streams (updates available)
Given I use repository "dnf-ci-fedora-modular"
And I use repository "dnf-ci-fedora"
When I execute dnf with args "module enable postgresql:9.6"
Then the exit code is 0
And modules state is following
Expand All @@ -24,11 +21,17 @@ Scenario: List available updates for installed streams (updates available)
Given I use repository "dnf-ci-fedora-modular-updates"
When I execute dnf with args "updateinfo --list"
Then the exit code is 0
And stdout contains "FEDORA-2019-0329090518 enhancement postgresql-9.6.11-1.x86_64"
And stdout is
"""
<REPOSYNC>
FEDORA-2019-0329090518 enhancement postgresql-9.6.11-1.x86_64
"""


@bz1622614
Scenario: Updates for non enabled streams are hidden
Given I use repository "dnf-ci-fedora-modular"
And I use repository "dnf-ci-fedora"
When I execute dnf with args "module install postgresql:6/default"
Then the exit code is 0
And Transaction contains
Expand All @@ -40,4 +43,53 @@ Scenario: Updates for non enabled streams are hidden
Given I use repository "dnf-ci-fedora-modular-updates"
Then I execute dnf with args "updateinfo --list"
Then the exit code is 0
And stdout does not contain "FEDORA-2019-0329090518 enhancement postgresql-9.6.11-1.x86_64"
And stdout is
"""
<REPOSYNC>
"""


@bz1804234
Scenario: having installed packages from one collection and enabled all modules from another doesn't activate advisory
Given I use repository "dnf-ci-fedora"
And I execute dnf with args "install nodejs"
And I use repository "dnf-ci-fedora-modular-updates"
And I execute dnf with args "module enable postgresql:9.6"
When I execute dnf with args "updateinfo --list"
Then stdout is
"""
<REPOSYNC>
"""


@bz1804234
Scenario: having installed packages from all collections but enabled modules only for one shows just the one
Given I use repository "dnf-ci-fedora"
And I execute dnf with args "install nodejs"
And I use repository "dnf-ci-fedora-modular"
And I execute dnf with args "module enable postgresql:9.6"
And I execute dnf with args "module install postgresql/default"
And I use repository "dnf-ci-fedora-modular-updates"
When I execute dnf with args "updateinfo --list"
Then stdout is
"""
<REPOSYNC>
FEDORA-2019-0329090518 enhancement postgresql-9.6.11-1.x86_64
"""


Scenario: having two active collections shows packages from both
Given I use repository "dnf-ci-fedora"
And I execute dnf with args "install nodejs"
And I use repository "dnf-ci-fedora-modular"
And I execute dnf with args "module enable postgresql:9.6"
And I execute dnf with args "module install postgresql/default"
And I use repository "dnf-ci-fedora-modular-updates"
And I execute dnf with args "module enable nodejs:8"
When I execute dnf with args "updateinfo --list"
Then stdout is
"""
<REPOSYNC>
FEDORA-2019-0329090518 enhancement nodejs-1:8.14.0-1.x86_64
FEDORA-2019-0329090518 enhancement postgresql-9.6.11-1.x86_64
"""
Expand Up @@ -13,14 +13,21 @@
<reference href="https://foobar/foobarupdate_2" id="2222" type="cve" title="CVE-2999"/>
</references>
<pkglist>
<collection short="named collection">
<name>Foo component</name>
<collection short="postgresql collection">
<name>postgresql component</name>
<module name="postgresql" stream="9.6" version="20190109151606" context="6c81f848" arch="x86_64"/>
<package name="postgresql" version="9.6.11" release="1" epoch="0" arch="x86_64" src="http://www.foo.org">
<filename>postgresql-9.6.11-1.module_2689+ea8f147f.spec</filename>
<reboot_suggested/>
</package>
</collection>
<collection short="nodejs collection">
<name>nodejs component</name>
<module name="nodejs" stream="8" version="20181216123422" context="7f892346" arch="x86_64"/>
<package name="nodejs" version="8.14.0" release="1" epoch="1" arch="x86_64" src="http://www.foo.org">
<filename>nodejs-8.14.0-1.x86_64.rpm</filename>
</package>
</collection>
</pkglist>
</update>
</updates>