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

satellite and capsule installation improvements #12961

Merged
merged 6 commits into from
Nov 21, 2023

Conversation

rmynar
Copy link
Contributor

@rmynar rmynar commented Oct 23, 2023

Applying changes from Component evaluation

  • added pit marker for Satellite and Capsule installation tests
  • added various log checks (and removed stubbed tescases)
  • removed redundant assertions

@rmynar rmynar requested a review from a team as a code owner October 23, 2023 13:51
@rmynar rmynar added CherryPick PR needs CherryPick to previous branches 6.14.z Introduced in or relating directly to Satellite 6.14 labels Oct 23, 2023
@rmynar
Copy link
Contributor Author

rmynar commented Oct 23, 2023

trigger: test-robottelo
pytest: tests/foreman/installer/test_installer.py -k 'test_satellite_installation or test_capsule_installation'

@rmynar
Copy link
Contributor Author

rmynar commented Oct 25, 2023

trigger: test-robottelo
pytest: tests/foreman/installer/test_installer.py -k 'test_satellite_installation or test_capsule_installation'

@@ -1395,14 +1413,29 @@ def test_capsule_installation(sat_default_install, cap_ready_rhel, default_org):
assert sat_default_install.api.Capsule().search(
query={'search': f'name={cap_ready_rhel.hostname}'}
)[0]

# no errors/failures in journald
result = cap_ready_rhel.execute(
Copy link
Contributor

Choose a reason for hiding this comment

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

non-blocking. Considering there are a lot of assertions added here you could add a function for common capsule installation assertions like we have for satellite.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree. These assertions should to be put into separate function. I currently kept them in the testcase, because it's still only one place where these assertions are used. But as soon as they are used in another testcases (e.g. when ipv6 install tests are implemented) they should be separated.
I even had another idea. There are not so many differences in assertions for satellite and capsule, so there might be just one "common_installation_assertions" with intersection of these assertions.
I'm not sure which idea is better, so let's keep it for later discussion and iprovements.

@@ -1361,6 +1378,7 @@ def sat_non_default_install(module_sat_ready_rhels):

@pytest.mark.e2e
@pytest.mark.tier1
@pytest.mark.pit
Copy link
Member

Choose a reason for hiding this comment

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

Great to see this inclusion, @rmynar! Please get in touch with me after this PR is merged. I would like to do a test execution of the PIT pipeline to see how the test behaves in it.

Copy link
Member

Choose a reason for hiding this comment

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

Please change the marker to pit_client since the bare pit marker does not exist. The client scenario marker must be used instead of the server one since we do not change the content_host configs in the server scenario contrary to the client scenario where we change the config to spawn. Therefore we would get a released RHEL instead of a non-released one.

@rmynar
Copy link
Contributor Author

rmynar commented Oct 31, 2023

trigger: test-robottelo
pytest: tests/foreman/installer/test_installer.py -k 'test_satellite_installation or test_capsule_installation'

@rmynar rmynar requested a review from pondrejk October 31, 2023 12:10
Copy link
Contributor

@pondrejk pondrejk left a comment

Choose a reason for hiding this comment

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

ack pending passing prt

@rmynar
Copy link
Contributor Author

rmynar commented Nov 2, 2023

trigger: test-robottelo
pytest: tests/foreman/installer/test_installer.py -k 'test_satellite_installation or test_capsule_installation'

@rmynar
Copy link
Contributor Author

rmynar commented Nov 2, 2023

previous prt failure was caused by product bug, so i entered a bz and made the assertion conditional depending on bz status. current prt passed successfully

@@ -1361,6 +1378,7 @@ def sat_non_default_install(module_sat_ready_rhels):

@pytest.mark.e2e
@pytest.mark.tier1
@pytest.mark.pit
Copy link
Member

Choose a reason for hiding this comment

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

Please change the marker to pit_client since the bare pit marker does not exist. The client scenario marker must be used instead of the server one since we do not change the content_host configs in the server scenario contrary to the client scenario where we change the config to spawn. Therefore we would get a released RHEL instead of a non-released one.


# no errors/failures in journald
result = cap_ready_rhel.execute(
r'journalctl -q --no-pager -b -p err -u "pulpcore" -u "foreman" -u "foreman-proxy" -u "httpd" -u "postgresql" -u "pulpcore-api" -u "pulpcore-worker"'
Copy link
Member

Choose a reason for hiding this comment

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

If I am not wrong, you did not cover all services in this list. I would recommend you store all service names in a list that could be placed in constants and generate the command based on it. The list should ideally contain all services that satellite-maintain checks in its service status check.

Copy link
Member

Choose a reason for hiding this comment

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

non-blocking ^

@rmynar
Copy link
Contributor Author

rmynar commented Nov 14, 2023

trigger: test-robottelo
pytest: tests/foreman/installer/test_installer.py -k 'test_satellite_installation or test_capsule_installation'

@ogajduse
Copy link
Member

To the one who will be merging it: please squash and merge so Auto Cherry-pick picks all changes.

github-actions bot pushed a commit that referenced this pull request Nov 21, 2023
* satellite and capsule installation improvements

* check logs with journal instead of syslog

* check logs for errors only

* skip assertion if BZ is open

* fix pit marker

* improved logs testing

(cherry picked from commit c4cef13)
ogajduse pushed a commit that referenced this pull request Nov 21, 2023
* satellite and capsule installation improvements

* check logs with journal instead of syslog

* check logs for errors only

* skip assertion if BZ is open

* fix pit marker

* improved logs testing

(cherry picked from commit c4cef13)
shweta83 pushed a commit to shweta83/robottelo that referenced this pull request Apr 10, 2024
* satellite and capsule installation improvements

* check logs with journal instead of syslog

* check logs for errors only

* skip assertion if BZ is open

* fix pit marker

* improved logs testing
@rmynar rmynar deleted the compeval-batch2 branch February 19, 2025 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.14.z Introduced in or relating directly to Satellite 6.14 CherryPick PR needs CherryPick to previous branches
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants