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 coverage for improved countme system age #1501

Merged
merged 8 commits into from
Aug 29, 2024

Commits on May 9, 2024

  1. Fix up the pattern in "countme disabled" scenario

    Make sure *no* countme flag is present.
    dmnks committed May 9, 2024
    Configuration menu
    Copy the full SHA
    74847f4 View commit details
    Browse the repository at this point in the history
  2. Add $releasever to metalink URL

    Also adapt the HTTP matching patterns in the countme feature file
    accordingly.
    
    This will be used in the next commit, no functional change right now.
    dmnks committed May 9, 2024
    Configuration menu
    Copy the full SHA
    c29806e View commit details
    Browse the repository at this point in the history
  3. 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.
    dmnks committed May 9, 2024
    Configuration menu
    Copy the full SHA
    96e9567 View commit details
    Browse the repository at this point in the history
  4. Convert $releasever "given" step to generic step

    We'll need this step in a "when" context in the next commit.
    
    No functional change.
    dmnks committed May 9, 2024
    Configuration menu
    Copy the full SHA
    ec0cb2d View commit details
    Browse the repository at this point in the history

Commits on Jun 6, 2024

  1. Add coverage for improved countme system age

    Adapt the countme feature to the libdnf fix for issue #1611, namely:
    
    - Turn the main scenario into a scenario outline to capture the various
      machine-id(5) configurations (see the table).
    
    - Add an upgrade scenario (from F39 to F40) that verifies that system
      age is now independent of $releasever on systems with a machine-id
      file.
    
    - Use NO_FAKE_STAT=1 in faketime invocations so that filesystem
      timestamps are *not* reported relative to the target time (this would
      break our custom machine-id timestamps we set here), see faketime(1)
      for details.
    
    - Add a new MachineId class to encapsulate the machine-id file, similar
      to OSRelease.
    
    - Mark the touched scenarios as destructive (due to them overriding the
      machine-id file).
    dmnks committed Jun 6, 2024
    Configuration menu
    Copy the full SHA
    a1c39aa View commit details
    Browse the repository at this point in the history

Commits on Aug 7, 2024

  1. countme.feature: use --refresh for dnf5's makecache

    There is a difference between `makecache` command from dnf5 and old
    dnf4. dnf4 always fetches new metalink/mirrorlist and ignores expiration
    of the repo, this is likely a long-standing bug. On the other hand dnf5
    doesn't contant the remote if the cache is fresh.
    
    Since the countme tests rely on the dnf4 behavior ensure it by using
    `--refresh` for dnf5.
    kontura committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    98b7c4d View commit details
    Browse the repository at this point in the history
  2. steps: trim spaces and wrap os-release values in quotes

    According to OS-RELEASE(5) man page values with characters outside of
    A–Z, a–z, 0–9 such as spaces or dots must be enclosed in double/single
    quotes.
    
    While handling of the `os-release` file is still work in progress in
    dnf5 make the step more robust by wrapping all values in quotes.
    
    Old dnf4 was able to handle even non-conforming `os-release` file.
    kontura committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    7083a13 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c72ea1d View commit details
    Browse the repository at this point in the history