Skip to content

Commit

Permalink
Modify and enable tests for repo substitutions
Browse files Browse the repository at this point in the history
  • Loading branch information
j-mracek authored and evan-goode committed Aug 2, 2023
1 parent bbb3ec5 commit 4aa8afa
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions dnf-behave-tests/dnf/vars.feature
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
Feature: Subtitute variables


# @dnf5
# TODO(nsella) different exit code
@dnf5
@bz1651092
Scenario: Variables are substituted in mirrorlist URLs
Given I use repository "dnf-ci-fedora" with configuration
Expand All @@ -14,8 +13,7 @@ Scenario: Variables are substituted in mirrorlist URLs
"""
file:///{context.dnf.installroot}/temp-repos/base-$basearch/
"""
Then I set config option "basearch" to "noarch"
And I execute dnf with args "install setup"
Then I execute dnf with args "install setup --setvar=basearch=noarch"
Then the exit code is 0
And Transaction is following
| Action | Package |
Expand All @@ -24,6 +22,7 @@ Scenario: Variables are substituted in mirrorlist URLs

# @dnf5
# TODO(nsella) different stdout
# TODO(jmracek) Problem with double substitution in section name
Scenario: Variables arch supports basearch `loongarch64` {}
Given I create file "/etc/dnf/vars/distrib" with
"""
Expand All @@ -35,8 +34,7 @@ Scenario: Variables arch supports basearch `loongarch64` {}
name=dnf-ci-test-$distrib test repository
enabled=0
"""
Then I set config option "arch" to "loongarch64"
When I execute dnf with args "repolist --disabled"
When I execute dnf with args "repolist --disabled --setvar=arch=loongarch64"
Then the exit code is 0
And stdout matches line by line
"""
Expand All @@ -45,8 +43,7 @@ Scenario: Variables arch supports basearch `loongarch64` {}
"""


# @dnf5
# TODO(nsella) different stdout
@dnf5
@bz1748841
Scenario: Variables without {} are substituted in repo id
Given I create file "/etc/dnf/vars/distrib" with
Expand All @@ -67,8 +64,7 @@ Scenario: Variables without {} are substituted in repo id
dnf-ci-test-fedora\s+dnf-ci-test-fedora test repository
"""

# @dnf5
# TODO(nsella) different stdout
@dnf5
Scenario: Variables with {} are substituted in repo id
Given I create file "/etc/dnf/vars/distrib" with
"""
Expand All @@ -88,6 +84,7 @@ Scenario: Variables with {} are substituted in repo id
dnf-ci-test-fedora\s+dnf-ci-test-fedora test repository
"""

# @dnf5
@bz2091636
Scenario: Using dnf with non-files in /etc/dnf/vars
Given I create directory "/{context.dnf.installroot}/etc/dnf/vars/troublemaker"
Expand All @@ -100,7 +97,7 @@ Scenario: Using dnf with non-files in /etc/dnf/vars
dnf-ci-fedora\s+dnf-ci-fedora test repository
"""


# @dnf5
@bz2141215
Scenario: Ignoring variable files with invalid encoding
Given I copy file "{context.dnf.fixturesdir}/data/releasever-invalid-encoding" to "/etc/dnf/vars/releasever"
Expand Down

0 comments on commit 4aa8afa

Please sign in to comment.