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

limit command output to important lines #7692

Merged
merged 1 commit into from
Oct 16, 2023

Conversation

mcalmer
Copy link
Contributor

@mcalmer mcalmer commented Oct 16, 2023

What does this PR change?

The full result is so big, that internal buffers seems to be filled and not the complete output is returned.
This cause no "SLES" keyword is included in the output and the test always hit the timeout.

This PR return only the important lines and make the test pass again.

GUI diff

No difference.

  • DONE

Documentation

  • No documentation needed: only internal and user invisible changes

  • DONE

Test coverage

  • No tests: already covered

  • DONE

Links

Tracks https://github.com/SUSE/spacewalk/pull/22784

  • DONE

Changelogs

Make sure the changelogs entries you are adding are compliant with https://github.com/uyuni-project/uyuni/wiki/Contributing#changelogs and https://github.com/uyuni-project/uyuni/wiki/Contributing#uyuni-projectuyuni-repository

If you don't need a changelog check, please mark this checkbox:

  • No changelog needed

If you uncheck the checkbox after the PR is created, you will need to re-run changelog_test (see below)

Re-run a test

If you need to re-run a test, please mark the related checkbox, it will be unchecked automatically once it has re-run:

  • Re-run test "changelog_test"
  • Re-run test "backend_unittests_pgsql"
  • Re-run test "java_pgsql_tests"
  • Re-run test "schema_migration_test_pgsql"
  • Re-run test "susemanager_unittests"
  • Re-run test "javascript_lint"
  • Re-run test "spacecmd_unittests"

Copy link
Member

@nodeg nodeg left a comment

Choose a reason for hiding this comment

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

I did some small tests

suma-43-srv:~ # spacecmd -u admin -p admin api sync.content.listProducts > test_long
INFO: Spacewalk Username: admin
INFO: Connected to https://suma-43-srv.mgr.suse.de/rpc/api as admin
WARNING: The traditional stack is deprecated as of the release of SUSE manager 4.3. It will be unsupported in the next major release, version 4.4 or greater. Consider migrating to salt minions before this release.

suma-43-srv:~ # spacecmd -u admin -p admin api sync.content.listProducts | grep SLES > test_short
INFO: Spacewalk Username: admin
INFO: Connected to https://suma-43-srv.mgr.suse.de/rpc/api as admin
WARNING: The traditional stack is deprecated as of the release of SUSE manager 4.3. It will be unsupported in the next major release, version 4.4 or greater. Consider migrating to salt minions before this release.

suma-43-srv:~ # cat test_long | wc -l
10115

suma-43-srv:~ # cat test_short | wc -l
111
suma-43-srv:~ #

Furthermore, the step works again. Tested on a local HEAD environment.

  Scenario: Wait for refresh of list of products to finish # features/core/srv_first_settings.feature:40
      This scenario ran at: 2023-10-16 11:17:04 +0200
    When I wait until mgr-sync refresh is finished         # features/step_definitions/command_steps.rb:693
      This scenario took: 4 seconds

Thank you for diving into this and preparing a fix, mc!

@mcalmer mcalmer merged commit 24f0b74 into uyuni-project:master Oct 16, 2023
10 checks passed
@mcalmer mcalmer deleted the testsuite-fix-refresh-check branch October 16, 2023 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants