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 (dnf 4) #1512

Merged
merged 5 commits into from
Jun 12, 2024

Conversation

dmnks
Copy link
Contributor

@dmnks dmnks commented Jun 3, 2024

Tests for rpm-software-management/libdnf#1662.

Rebased from #1501.

dmnks added 4 commits June 3, 2024 12:59
Make sure *no* countme flag is present.
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.
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.
We'll need this step in a "when" context in the next commit.

No functional change.
@dmnks dmnks changed the title Add coverage for improved countme system age Add coverage for improved countme system age (dnf 4) Jun 3, 2024
@jan-kolarik
Copy link
Member

jan-kolarik commented Jun 6, 2024

@dmnks I've re-run the tests after the PR actually being merged, but the countme scenarios are failing there. Could you please take a look?

@dmnks
Copy link
Contributor Author

dmnks commented Jun 6, 2024

Hmm, that's weird, will have a closer look later today. Thanks!

@dmnks
Copy link
Contributor Author

dmnks commented Jun 6, 2024

OK, this is a test issue. The failing scenario makes the "+3 days" step fall into a new "countme week", probably due to timezone differences. I'm looking into it now.

@dmnks
Copy link
Contributor Author

dmnks commented Jun 6, 2024

Should be fixed now. I've pushed some of these as "fixup" commits so you can see the changes but feel free to squash them before merging the PR (or let me know and I'll squash them).

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
Copy link
Contributor Author

dmnks commented Jun 6, 2024

Nevermind, I've squashed them now 😄 It's now ready to be merged as is.

Copy link
Member

@jan-kolarik jan-kolarik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jan-kolarik jan-kolarik merged commit f51c788 into rpm-software-management:dnf-4-stack Jun 12, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants