From 96e95672f492e7451eb232bdeaf9fa59b96453b1 Mon Sep 17 00:00:00 2001 From: Michal Domonkos Date: Tue, 7 May 2024 13:00:23 +0200 Subject: [PATCH] Improve readability of main countme scenario Shuffle some steps around, add blank lines and also emphasize that we're dealing with *calendar* weeks/months (i.e. aligned with the calendar, not with the first countme hit). No functional change. --- dnf-behave-tests/dnf/countme.feature | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/dnf-behave-tests/dnf/countme.feature b/dnf-behave-tests/dnf/countme.feature index 0939a4f3c..81daa4ace 100644 --- a/dnf-behave-tests/dnf/countme.feature +++ b/dnf-behave-tests/dnf/countme.feature @@ -40,49 +40,55 @@ Feature: Better user counting | header | value | | User-Agent | Agent 007 | - Scenario: Countme flag is sent once per week + Scenario: Countme flag is sent once per calendar week Given I set config option "countme" to "1" - And today is Wednesday, August 07, 2019 And I copy repository "dnf-ci-fedora" for modification And I use repository "dnf-ci-fedora" as http And I set up metalink for repository "dnf-ci-fedora" And I start capturing outbound HTTP requests - # First week (bucket 1) + + # First calendar week (bucket 1) # Note: One in the first 4 requests is randomly chosen to include the # flag (see COUNTME_BUDGET=4 in libdnf/repo/Repo.cpp for details) + When today is Wednesday, August 07, 2019 When I execute dnf with args "makecache" 4 times Then exactly one HTTP GET request should match: | path | | */metalink.xml*&countme=1 | - # Same week (should not be sent) + + # Same calendar week (should not be sent) When today is Friday, August 09, 2019 And I forget any HTTP requests captured so far And I execute dnf with args "makecache" 4 times Then no HTTP GET request should match: | path | | */metalink.xml*&countme=* | - # Next week (bucket 1) + + # Next calendar week (bucket 1) When today is Tuesday, August 13, 2019 And I forget any HTTP requests captured so far And I execute dnf with args "makecache" 4 times Then exactly one HTTP GET request should match: | path | | */metalink.xml*&countme=1 | - # Next week (bucket 2) + + # Next calendar week (bucket 2) When today is Tuesday, August 21, 2019 And I forget any HTTP requests captured so far And I execute dnf with args "makecache" 4 times Then exactly one HTTP GET request should match: | path | | */metalink.xml*&countme=2 | - # 1 month later (bucket 3) + + # 1 calendar month later (bucket 3) When today is Tuesday, September 16, 2019 And I forget any HTTP requests captured so far And I execute dnf with args "makecache" 4 times Then exactly one HTTP GET request should match: | path | | */metalink.xml*&countme=3 | - # 6 months later (bucket 4) + + # 6 calendar months later (bucket 4) When today is Tuesday, March 15, 2020 And I forget any HTTP requests captured so far And I execute dnf with args "makecache" 4 times