Skip to content

Commit

Permalink
Enable 'clean' command tests for the daemon
Browse files Browse the repository at this point in the history
  • Loading branch information
m-blaha authored and kontura committed Aug 1, 2024
1 parent 589e793 commit ce5b984
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
13 changes: 9 additions & 4 deletions dnf-behave-tests/dnf/clean-cachefiles.feature
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@dnf5
@dnf5daemon
Feature: Testing that dnf clean command removes files from the cache


Expand Down Expand Up @@ -27,7 +28,8 @@ Background: Fill the cache

Scenario: Cleanup of the whole cache (dnf clean all)
When I execute dnf with args "clean all"
And I execute "find | sort" in "{context.dnf.installroot}/var/cache/dnf"
Then the exit code is 0
When I execute "find | sort" in "{context.dnf.installroot}/var/cache/dnf"
Then stdout matches line by line
"""
\.
Expand All @@ -36,7 +38,8 @@ Scenario: Cleanup of the whole cache (dnf clean all)

Scenario: Cached metadata cleanup (dnf clean metadata)
When I execute dnf with args "clean metadata"
And I execute "find | sort" in "{context.dnf.installroot}/var/cache/dnf"
Then the exit code is 0
When I execute "find | sort" in "{context.dnf.installroot}/var/cache/dnf"
Then stdout matches line by line
"""
\.
Expand All @@ -48,7 +51,8 @@ Scenario: Cached metadata cleanup (dnf clean metadata)

Scenario: Cached packages cleanup (dnf clean packages)
When I execute dnf with args "clean packages"
And I execute "find | sort" in "{context.dnf.installroot}/var/cache/dnf"
Then the exit code is 0
When I execute "find | sort" in "{context.dnf.installroot}/var/cache/dnf"
Then stdout matches line by line
"""
\.
Expand All @@ -63,7 +67,8 @@ Scenario: Cached packages cleanup (dnf clean packages)

Scenario: Database cached cleanup (dnf clean dbcache)
When I execute dnf with args "clean dbcache"
And I execute "find | sort" in "{context.dnf.installroot}/var/cache/dnf"
Then the exit code is 0
When I execute "find | sort" in "{context.dnf.installroot}/var/cache/dnf"
Then stdout matches line by line
"""
\.
Expand Down
6 changes: 3 additions & 3 deletions dnf-behave-tests/dnf/clean.feature
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@dnf5
Feature: Testing dnf clean command


@dnf5
Scenario: Ensure that metadata are unavailable after "dnf clean all"
Given I use repository "dnf-ci-rich"
When I execute dnf with args "makecache"
Expand All @@ -28,8 +28,8 @@ Scenario: Ensure that metadata are unavailable after "dnf clean all"
"""


@dnf5
@tier1
@dnf5daemon
Scenario: Expire dnf cache and run repoquery for a package that has been removed meanwhile
Given I copy repository "dnf-ci-thirdparty-updates" for modification
And I use repository "dnf-ci-thirdparty-updates"
Expand Down Expand Up @@ -70,8 +70,8 @@ Scenario: Expire dnf cache and run repoquery for a package that has been removed
"""


@dnf5
@tier1
@dnf5daemon
Scenario: Expire dnf cache and run repoquery when a package has been removed meanwhile
Given I copy repository "dnf-ci-thirdparty-updates" for modification
And I use repository "dnf-ci-thirdparty-updates"
Expand Down

0 comments on commit ce5b984

Please sign in to comment.