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: Use SCA to register #70

Merged
merged 1 commit into from
Aug 13, 2024
Merged

test: Use SCA to register #70

merged 1 commit into from
Aug 13, 2024

Conversation

m-horky
Copy link
Contributor

@m-horky m-horky commented Jul 16, 2024

No description provided.

@jirihnidek
Copy link
Contributor

I would like to just mark failing test case skipped and resolve this issue later. I want to move forward.

@ptoscano
Copy link
Collaborator

I would like to just mark failing test case skipped and resolve this issue later. I want to move forward.

That isn't exactly a good solution, especially when there only few test cases. Skipping any means effectively starting to not test things anymore.

I'll look into the candlepin test data, and see what can be done.

@ptoscano
Copy link
Collaborator

ptoscano commented Aug 5, 2024

I'll look into the candlepin test data, and see what can be done.

This was done few days ago, and at least it seemed working for me. The "services" cockpit image that contains the Candlepin container was just refreshed, so hopefully it should be fine here too.

Would you please rebase this?

@ptoscano
Copy link
Collaborator

ptoscano commented Aug 6, 2024

Most likely also the used product needs to be tweaked; since the organization is donaldduck, the product should likely be 7050 ("Donaldy", "Donaldy OS Premium Architecture Bits") instead of 6050 ("Snowy").

test/check-subscriptions Outdated Show resolved Hide resolved
@ptoscano
Copy link
Collaborator

ptoscano commented Aug 7, 2024

The activation key script (see ACTIVATION_KEY_SCRIPT) needs to be adapted to the different user: see e["owner"]["displayName"] and e["owner"]["key"].

Since SCA now enables automatically all the content of the organization, this means redhat.repo gets enabled repositories by default; configured repositories have

gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-candlepin

which is not available in the system, and needs to be downloaded from Candlepin; furthermore, the candlepin container in the services image does not expose the port 8080 for content, so also dnf is not able to download the metadata of repositories. At least those issues causes the failure of TestSubscriptionsPackages.testMissingPackages. I'll fix the bits in the services image of cockpit.

Not sure about the rest of the failures, will need to dig more.

@ptoscano
Copy link
Collaborator

ptoscano commented Aug 7, 2024

After a bit more debugging and analysis, I know what happens and what to do.


Regarding the tests TestSubscriptions.testRegister and TestSubscriptions.testRegisterWithKey: they try to verify that, after the registration, certain products are registered (checking the "Registered" green item next to each product). The problem is that, in SCA mode, the concept of "products" is very reduced, and there are no such info on the status of products; this means that those checks do not make sense anymore. Hence, considering the account used for testing is switched to an SCA one, all the wait_subscription() bits can be simply dropped. Please do that, mentioning the reasons in the commit message.


Regarding the TestSubscriptionsPackages.testMissingPackages test: I mentioned in my previous comment the reason, i.e. we need to set up the repository management in subscription-manager properly:

  1. copy the RPM GPG key from Candlepin
  2. set the baseurl in the configuration

Both are easy to do, and I have the changes for them locally. The problem is that the candlepin container in the services cockpit image does not expose the port 8080, and thus the repositories cannot be accessed. I created earlier cockpit-project/bots#6708 for the cockpit CI, and it will require the refresh of the services image -- not a complicated process, though.


The other few bits I mentioned inline needs to be fixed too :)

* Card ID: CCT-612
* Card ID: RHEL-41063

List of notable changes:
- Switched the tests to use accounts that are part of SCA organization
- Removed calls to `wait_subscription`.
  In SCA, there is no "product status", we don't need/can't continue
  checking for it.
Copy link
Collaborator

@ptoscano ptoscano left a comment

Choose a reason for hiding this comment

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

LGTM now, thanks!

@ptoscano ptoscano merged commit 16caea1 into main Aug 13, 2024
6 checks passed
@ptoscano ptoscano deleted the mhorky/sca-tests branch August 13, 2024 11:14
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.

3 participants