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

test: various misc changes #81

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Conversation

ptoscano
Copy link
Collaborator

@ptoscano ptoscano commented Sep 4, 2024

Various changes for the test scripts, with no actual behaviour changes:

  • use existing APIs from the cockpit testlib (testOnly(), Machine.write())
  • use /etc/pki/product-default for product certificates
  • use a simpler way to wait for Candlepin
  • drop the no more needed activation key Python script
  • switch usages of % string interpolation with f-strings

@ptoscano ptoscano force-pushed the ptoscano/test-misc-changes branch from e779a0c to baa7333 Compare October 25, 2024 12:02
Use the onlyImage() decorator provided by the test lib of cockpit,
replacing the usage of our own skipUnlessDistroFamily().

There is no behaviour change.
The Python snippet to add a pool to an activation key in practice does
not work anymore for two reasons:
1) the test data in the self-deployed Candlepin changed
2) the test account used is based on SCA
and the result of the last POST in the script is:
  {
    "displayMessage" : "Multi-entitlement not supported for pool \"Pool [id: 8a8082e491b0fb160191b0fb37e20233, type: NORMAL, product: sfs, productName: Shared File System, quantity: 5]\"",
    "requestUuid" : "8e43664e-e720-4cb8-8a99-bfe3cd49af2c"
  }

Especially because of (2), it is possible to get rid of the script
altogether, and simply use the available activation keys.

There is no behaviour change.
Instead of running a Python script to wait for Candlepin to start, use
curl to do the busy-wait loop. Keep the initial delay as-is, performing
it inline.

There should be no behaviour changes.
Use f-strings to replace C-like placeholders and format() calls.

There is no behaviour change.
Use the existing API of a cockpit Machine, rather than running a shell
command manually.

There is no behaviour change.
There are no more Python scripts to run as part of the tests.
@ptoscano ptoscano force-pushed the ptoscano/test-misc-changes branch from baa7333 to 862c23c Compare November 28, 2024 10:38
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.

1 participant